home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCEAuthDir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  170.6 KB  |  4,429 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEAuthDir.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __OCEAUTHDIR__
  19. #define __OCEAUTHDIR__
  20.  
  21. #ifndef __APPLETALK__
  22. #include <AppleTalk.h>
  23. #endif
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. #ifndef __OSUTILS__
  28. #include <OSUtils.h>
  29. #endif
  30. #ifndef __TYPES__
  31. #include <Types.h>
  32. #endif
  33.  
  34. #ifndef __OCE__
  35. #include <OCE.h>
  36. #endif
  37.  
  38.  
  39.  
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. #if PRAGMA_IMPORT
  49. #pragma import on
  50. #endif
  51.  
  52. #if PRAGMA_STRUCT_ALIGN
  53.     #pragma options align=mac68k
  54. #elif PRAGMA_STRUCT_PACKPUSH
  55.     #pragma pack(push, 2)
  56. #elif PRAGMA_STRUCT_PACK
  57.     #pragma pack(2)
  58. #endif
  59.  
  60. /*****************************************************************************/
  61.  
  62. enum {
  63.     kRC4KeySizeInBytes            = 8,                            /* size of an RC4 key */
  64.     kRefNumUnknown                = 0
  65. };
  66.  
  67.  
  68. enum {
  69.     kEnumDistinguishedNameBit    = 0,
  70.     kEnumAliasBit                = 1,
  71.     kEnumPseudonymBit            = 2,
  72.     kEnumDNodeBit                = 3,
  73.     kEnumInvisibleBit            = 4
  74. };
  75.  
  76. /* Values of DirEnumChoices */
  77.  
  78. enum {
  79.     kEnumDistinguishedNameMask    = 1L << kEnumDistinguishedNameBit,
  80.     kEnumAliasMask                = 1L << kEnumAliasBit,
  81.     kEnumPseudonymMask            = 1L << kEnumPseudonymBit,
  82.     kEnumDNodeMask                = 1L << kEnumDNodeBit,
  83.     kEnumInvisibleMask            = 1L << kEnumInvisibleBit,
  84.     kEnumAllMask                = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  85. };
  86.  
  87. typedef unsigned long                     DirEnumChoices;
  88. /* Values of DirSortOption */
  89.  
  90. enum {
  91.     kSortByName                    = 0,
  92.     kSortByType                    = 1
  93. };
  94.  
  95.  
  96. /* Values of DirSortDirection */
  97.  
  98. enum {
  99.     kSortForwards                = 0,
  100.     kSortBackwards                = 1
  101. };
  102.  
  103. /* Values of DirMatchWith */
  104.  
  105. enum {
  106.     kMatchAll                    = 0,
  107.     kExactMatch                    = 1,
  108.     kBeginsWith                    = 2,
  109.     kEndingWith                    = 3,
  110.     kContaining                    = 4
  111. };
  112.  
  113. typedef unsigned char                     DirMatchWith;
  114.  
  115. enum {
  116.     kCurrentOCESortVersion        = 1
  117. };
  118.  
  119. /*  Access controls are implemented on three levels:
  120.  *      DNode, Record, and Attribute Type levels
  121.  *  Some access control bits apply to the container itself, and some apply to its contents.
  122.  *
  123.  *  The Catalog Toolbox supports six functions.  These calls are:
  124.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  125.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  126.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  127.  * 
  128.  *  The GetXXXAccessControl calls will return access control masks for various categories
  129.  *  of users.  Please refer to the access control document for a description of the
  130.  *  categories of users.  In general these are:
  131.  *      ThisRecordOwner         - means the identity of the record itself
  132.  *      Friends                  - means any one of the assigned friends for the record
  133.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  134.  *          in the DNode in which this record is located
  135.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  136.  *      Guest                      - means an unauthenticated user.
  137.  *  Bit masks for various permitted access controls are defined below.
  138.  *
  139.  *  GetXXXAccessControl calls will return access control masks for various categories of
  140.  *  users for this record. In addition they also return the level of access controls
  141.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  142.  *  record, or attribute type.
  143.  *
  144.  *  For records, the access control granted will be minimum of the DNode access
  145.  *  control and record access control masks.  For example, to add an attribute type to a
  146.  *  record, a user must have access control kCreateAttributeTypes at the record and
  147.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  148.  *  minimum of the DNode, record, and attribute type access controls.
  149.  *
  150.  *  
  151.  */
  152. /* access privileges bit numbers */
  153.  
  154. enum {
  155.     kSeeBit                        = 0,
  156.     kAddBit                        = 1,
  157.     kDeleteBit                    = 2,
  158.     kChangeBit                    = 3,
  159.     kRenameBit                    = 4,
  160.     kChangePrivsBit                = 5,
  161.     kSeeFoldersBit                = 6
  162. };
  163.  
  164. /* Values of AccessMask */
  165.  
  166. enum {
  167.     kSeeMask                    = (1L << kSeeBit),
  168.     kAddMask                    = (1L << kAddBit),
  169.     kDeleteMask                    = (1L << kDeleteBit),
  170.     kChangeMask                    = (1L << kChangeBit),
  171.     kRenameMask                    = (1L << kRenameBit),
  172.     kChangePrivsMask            = (1L << kChangePrivsBit),
  173.     kSeeFoldersMask                = (1L << kSeeFoldersBit)
  174. };
  175.  
  176.  
  177. enum {
  178.     kAllPrivs                    = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
  179.     kNoPrivs                    = 0
  180. };
  181.  
  182. /*
  183.  
  184. kSupportsDNodeNumberBit:
  185. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  186. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  187. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  188. later case DNodeNumber component inside record location info must be set to zero.
  189.  
  190. kSupportsRecordCreationIDBit:
  191. If this bit is set, a record can be referenced by specifying CreationID 
  192. in most catalog manager calls. If this bit is not set recordName and recordType are 
  193. required in the recordID specification for all catalog manager calls.
  194.  
  195. kSupportsAttributeCreationIDBit:
  196. If this bit is set, an attribute value can be obtained by specifying it's 
  197. CreationID in Lookup call staring point and also can be used in operations 
  198. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  199. specified by AttributeType and CreationID.
  200.  
  201. *************************************************************************
  202. Implicit assumption with creationID's and dNodeNumbers are, when supported
  203. they are persistent and will preserved across boots and life of the system.
  204. *************************************************************************
  205.  
  206. Following three bits are for determining the sort order in enumeration.
  207. kSupportsMatchAllBit:
  208. If this bit is set, enumeration of all the records is supported
  209.  
  210. kSupportsBeginsWithBit:
  211. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  212. is supported
  213.  
  214. kSupportsExactMatchBit:
  215. If this bit is set, existence of a record matching exact matchNameString and recordType
  216. is supported.
  217.  
  218. kSupportsEndsWithBit:
  219. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  220. is supported.
  221.  
  222. kSupportsContainsBit:
  223. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  224. is supported
  225.  
  226.  
  227. Implicit assumption in all these is, a record type can be specified either as one of the above or
  228. a type list(more then one) to match exact type.
  229. The Following four bits will indicate sort ordering in enumeration.
  230.  
  231. kSupportsOrderedEnumerationBit:
  232. If this bit is set, Enumerated records or in some order possibly in name order.
  233.  
  234. kCanSupportNameOrderBit:
  235. If this is set, catalog will support sortbyName option in Enumerate.
  236.  
  237. kCanSupportTypeOrderBit:
  238. If this bit is set, catalog will support sortbyType option in enumearte.
  239.  
  240. kSupportSortBackwardsBit:
  241. If this bit is set, catalog supports backward sorting.
  242.  
  243. kSupportIndexRatioBit:
  244. If this bit is set, it indicates that enumeration will return approximate position
  245. of a record (percentile) among all records.
  246.  
  247. kSupportsEnumerationContinueBit:
  248. If this bit is set, catalog supports enumeration continue.
  249.  
  250. kSupportsLookupContinueBit:
  251. If this bit is set, catalog supports lookup continue.
  252.  
  253. kSupportsEnumerateAttributeTypeContinueBit:
  254. If this bit is set, catalog supports EnumerateAttributeType continue.
  255.  
  256. kSupportsEnumeratePseudonymContinueBit:
  257. If this bit is set, catalog supports EnumeratePseudonym continue.
  258.  
  259. kSupportsAliasesBit:
  260. If this bit is set, catalog supports create/delte/enumerate 
  261. of Alias Records.
  262.  
  263. kSupportPseudonymBit: 
  264. If this bit is set, catalog supports create/delte/enumerate of 
  265. pseudonyms for a record.
  266.  
  267. kSupportsPartialPathNameBit:
  268. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  269. intermediate DNode and a partial name starting from that DNode to the intended 
  270. DNode.
  271.  
  272. kSupportsAuthenticationBit:
  273. If this bit is set, catalog supports authentication manager calls.
  274.  
  275. kSupportsProxiesBit:
  276. If this bit is set, catalog supports proxy related calls in authentication manager. 
  277.  
  278. kSupportsFindRecordBit:
  279. If this bit is set, catalog supports find record call.
  280.  
  281. Bits and corresponding masks are as defined below.
  282. */
  283.  
  284. enum {
  285.     kSupportsDNodeNumberBit        = 0,
  286.     kSupportsRecordCreationIDBit = 1,
  287.     kSupportsAttributeCreationIDBit = 2,
  288.     kSupportsMatchAllBit        = 3,
  289.     kSupportsBeginsWithBit        = 4,
  290.     kSupportsExactMatchBit        = 5,
  291.     kSupportsEndsWithBit        = 6,
  292.     kSupportsContainsBit        = 7,
  293.     kSupportsOrderedEnumerationBit = 8,
  294.     kCanSupportNameOrderBit        = 9,
  295.     kCanSupportTypeOrderBit        = 10,
  296.     kSupportSortBackwardsBit    = 11,
  297.     kSupportIndexRatioBit        = 12,
  298.     kSupportsEnumerationContinueBit = 13,
  299.     kSupportsLookupContinueBit    = 14,
  300.     kSupportsEnumerateAttributeTypeContinueBit = 15,
  301.     kSupportsEnumeratePseudonymContinueBit = 16,
  302.     kSupportsAliasesBit            = 17,
  303.     kSupportsPseudonymsBit        = 18,
  304.     kSupportsPartialPathNamesBit = 19,
  305.     kSupportsAuthenticationBit    = 20,
  306.     kSupportsProxiesBit            = 21,
  307.     kSupportsFindRecordBit        = 22
  308. };
  309.  
  310. /* values of DirGestalt */
  311.  
  312. enum {
  313.     kSupportsDNodeNumberMask    = 1L << kSupportsDNodeNumberBit,
  314.     kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
  315.     kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
  316.     kSupportsMatchAllMask        = 1L << kSupportsMatchAllBit,
  317.     kSupportsBeginsWithMask        = 1L << kSupportsBeginsWithBit,
  318.     kSupportsExactMatchMask        = 1L << kSupportsExactMatchBit,
  319.     kSupportsEndsWithMask        = 1L << kSupportsEndsWithBit,
  320.     kSupportsContainsMask        = 1L << kSupportsContainsBit,
  321.     kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
  322.     kCanSupportNameOrderMask    = 1L << kCanSupportNameOrderBit,
  323.     kCanSupportTypeOrderMask    = 1L << kCanSupportTypeOrderBit,
  324.     kSupportSortBackwardsMask    = 1L << kSupportSortBackwardsBit,
  325.     kSupportIndexRatioMask        = 1L << kSupportIndexRatioBit,
  326.     kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
  327.     kSupportsLookupContinueMask    = 1L << kSupportsLookupContinueBit,
  328.     kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
  329.     kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
  330.     kSupportsAliasesMask        = 1L << kSupportsAliasesBit,
  331.     kSupportsPseudonymsMask        = 1L << kSupportsPseudonymsBit,
  332.     kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
  333.     kSupportsAuthenticationMask    = 1L << kSupportsAuthenticationBit,
  334.     kSupportsProxiesMask        = 1L << kSupportsProxiesBit,
  335.     kSupportsFindRecordMask        = 1L << kSupportsFindRecordBit
  336. };
  337.  
  338.  
  339. /* Values of AuthLocalIdentityOp */
  340.  
  341. enum {
  342.     kAuthLockLocalIdentityOp    = 1,
  343.     kAuthUnlockLocalIdentityOp    = 2,
  344.     kAuthLocalIdentityNameChangeOp = 3
  345. };
  346.  
  347. /* Values of AuthLocalIdentityLockAction */
  348.  
  349. enum {
  350.     kAuthLockPending            = 1,
  351.     kAuthLockWillBeDone            = 2
  352. };
  353.  
  354.  
  355. /* Values of AuthNotifications */
  356.  
  357. enum {
  358.     kNotifyLockBit                = 0,
  359.     kNotifyUnlockBit            = 1,
  360.     kNotifyNameChangeBit        = 2
  361. };
  362.  
  363.  
  364. enum {
  365.     kNotifyLockMask                = 1L << kNotifyLockBit,
  366.     kNotifyUnlockMask            = 1L << kNotifyUnlockBit,
  367.     kNotifyNameChangeMask        = 1L << kNotifyNameChangeBit
  368. };
  369.  
  370.  
  371. enum {
  372.     kPersonalDirectoryFileCreator = FOUR_CHAR_CODE('kl03'),
  373.     kPersonalDirectoryFileType    = FOUR_CHAR_CODE('pabt'),
  374.     kBusinessCardFileType        = FOUR_CHAR_CODE('bust'),
  375.     kDirectoryFileType            = FOUR_CHAR_CODE('dirt'),
  376.     kDNodeFileType                = FOUR_CHAR_CODE('dnod'),
  377.     kDirsRootFileType            = FOUR_CHAR_CODE('drtt'),
  378.     kRecordFileType                = FOUR_CHAR_CODE('rcrd')
  379. };
  380.  
  381. typedef unsigned short                     DirSortOption;
  382. typedef unsigned short                     DirSortDirection;
  383. typedef unsigned long                     AccessMask;
  384. typedef unsigned long                     DirGestalt;
  385. typedef unsigned long                     AuthLocalIdentityOp;
  386. typedef unsigned long                     AuthLocalIdentityLockAction;
  387. typedef unsigned long                     AuthNotifications;
  388. struct DNodeID {
  389.     DNodeNum                         dNodeNumber;                /* dNodenumber  */
  390.     long                             reserved1;
  391.     RStringPtr                         name;
  392.     long                             reserved2;
  393. };
  394. typedef struct DNodeID DNodeID;
  395.  
  396. struct DirEnumSpec {
  397.     DirEnumChoices                     enumFlag;
  398.     unsigned short                     indexRatio;                    /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  399.     union {
  400.         LocalRecordID                     recordIdentifier;
  401.         DNodeID                         dNodeIdentifier;
  402.     }                                 u;
  403. };
  404. typedef struct DirEnumSpec DirEnumSpec;
  405.  
  406. struct DirMetaInfo {
  407.     unsigned long                     info[4];
  408. };
  409. typedef struct DirMetaInfo DirMetaInfo;
  410.  
  411. struct SLRV {
  412.     ScriptCode                         script;                        /*   Script code in which entries are sorted */
  413.     short                             language;                    /*   Language code in which entries are sorted */
  414.     short                             regionCode;                    /*   Region code in which entries are sorted */
  415.     short                             version;                    /*  version of oce sorting software */
  416. };
  417. typedef struct SLRV SLRV;
  418.  
  419. /* Catalog types and operations */
  420. /* unique identifier for an identity */
  421. typedef unsigned long                     AuthIdentity;
  422. /* Umbrella LocalIdentity */
  423. typedef AuthIdentity                     LocalIdentity;
  424. /* A DES key is 8 bytes of data */
  425. struct DESKey {
  426.     unsigned long                     a;
  427.     unsigned long                     b;
  428. };
  429. typedef struct DESKey DESKey;
  430.  
  431. typedef Byte                             RC4Key[8];
  432. typedef unsigned long                     AuthKeyType;
  433. /* key type followed by its data */
  434. struct AuthKey {
  435.     AuthKeyType                     keyType;
  436.     union {
  437.         DESKey                             des;
  438.         RC4Key                             rc4;
  439.     }                                 u;
  440. };
  441. typedef struct AuthKey AuthKey;
  442.  
  443. typedef AuthKey *                        AuthKeyPtr;
  444. typedef union AuthParamBlock             AuthParamBlock;
  445. typedef AuthParamBlock *                AuthParamBlockPtr;
  446. /* Fix parameter passing convention (#1274062) ggs, 8-7-95 */
  447. typedef CALLBACK_API( void , AuthIOCompletionProcPtr )(AuthParamBlockPtr paramBlock);
  448. /*
  449.     WARNING: AuthIOCompletionProcPtr uses register based parameters under classic 68k
  450.              and cannot be written in a high-level language without 
  451.              the help of mixed mode or assembly glue.
  452. */
  453. typedef REGISTER_UPP_TYPE(AuthIOCompletionProcPtr)                 AuthIOCompletionUPP;
  454. /*****************************************************************************
  455.  
  456.  
  457.         Authentication Manager operations 
  458.  
  459. *****************************************************************************/
  460. /*
  461. kAuthResolveCreationID:
  462. userRecord will contain the user information whose creationID has to be
  463. returned. A client must make this call when he does not know the creaitionID.
  464. The creationID must be set to nil before making the call. The server will attempt
  465. to match the recordid's in the data base which match the user name and
  466. type in the record.  Depending on number of matchings, following
  467. results will be returned.
  468. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  469. totalMatches = actualMatches = 1.
  470. > 1 Match:
  471.     Buffer is Large Enough:
  472.     totalMatches = actualMatches
  473.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  474. > 1 Match:
  475.     Buffer is not Large Enough:
  476.     totalMatches > actualMatches
  477.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  478. 0 Matches:
  479.  kOCENoSuchRecord error
  480. */
  481. struct AuthResolveCreationIDPB {
  482.     void *                            qLink;
  483.     long                             reserved1;
  484.     long                             reserved2;
  485.     AuthIOCompletionUPP             ioCompletion;
  486.     OSErr                             ioResult;
  487.     unsigned long                     saveA5;
  488.     short                             reqCode;
  489.     long                             reserved[2];
  490.     AddrBlock                         serverHint;
  491.     short                             dsRefNum;
  492.     unsigned long                     callID;
  493.     AuthIdentity                     identity;
  494.     long                             gReserved1;
  495.     long                             gReserved2;
  496.     long                             gReserved3;
  497.     long                             clientData;
  498.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  499.     unsigned long                     bufferLength;                /*  --> Buffer Size to hold duplicate Info */
  500.     void *                            buffer;                        /*  --> Buffer  to hold duplicate Info */
  501.     unsigned long                     totalMatches;                /* <--  Total Number of matching names found */
  502.     unsigned long                     actualMatches;                /* <--  Number of matches returned in the buffer */
  503. };
  504. typedef struct AuthResolveCreationIDPB AuthResolveCreationIDPB;
  505.  
  506. /*
  507. kAuthBindSpecificIdentity:
  508. userRecord will contain the user information whose identity has to be
  509. verified. userKey will contain the userKey. An Identity is returned which
  510. binds the key and the userRecord. The identity returned can be used in the 'identity'
  511. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  512. Authentication manager calls.
  513. */
  514. struct AuthBindSpecificIdentityPB {
  515.     void *                            qLink;
  516.     long                             reserved1;
  517.     long                             reserved2;
  518.     AuthIOCompletionUPP             ioCompletion;
  519.     OSErr                             ioResult;
  520.     unsigned long                     saveA5;
  521.     short                             reqCode;
  522.     long                             reserved[2];
  523.     AddrBlock                         serverHint;
  524.     short                             dsRefNum;
  525.     unsigned long                     callID;
  526.     AuthIdentity                     identity;
  527.     long                             gReserved1;
  528.     long                             gReserved2;
  529.     long                             gReserved3;
  530.     long                             clientData;
  531.     AuthIdentity                     userIdentity;                /* <--  binding identity */
  532.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  533.     AuthKeyPtr                         userKey;                    /*  --> OCE Key for the user */
  534. };
  535. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  536.  
  537. /*
  538. kAuthUnbindSpecificIdentity:
  539. This call will unbind the userRecord and key which were bind earlier.
  540. */
  541. struct AuthUnbindSpecificIdentityPB {
  542.     void *                            qLink;
  543.     long                             reserved1;
  544.     long                             reserved2;
  545.     AuthIOCompletionUPP             ioCompletion;
  546.     OSErr                             ioResult;
  547.     unsigned long                     saveA5;
  548.     short                             reqCode;
  549.     long                             reserved[2];
  550.     AddrBlock                         serverHint;
  551.     short                             dsRefNum;
  552.     unsigned long                     callID;
  553.     AuthIdentity                     identity;
  554.     long                             gReserved1;
  555.     long                             gReserved2;
  556.     long                             gReserved3;
  557.     long                             clientData;
  558.     AuthIdentity                     userIdentity;                /*  --> identity to be deleted */
  559. };
  560. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  561.  
  562.  
  563. /*
  564. kAuthGetSpecificIdentityInfo:
  565. This call will return the userRecord for the given identity. Note: key is not
  566. returned because this would compromise security.
  567. */
  568. struct AuthGetSpecificIdentityInfoPB {
  569.     void *                            qLink;
  570.     long                             reserved1;
  571.     long                             reserved2;
  572.     AuthIOCompletionUPP             ioCompletion;
  573.     OSErr                             ioResult;
  574.     unsigned long                     saveA5;
  575.     short                             reqCode;
  576.     long                             reserved[2];
  577.     AddrBlock                         serverHint;
  578.     short                             dsRefNum;
  579.     unsigned long                     callID;
  580.     AuthIdentity                     identity;
  581.     long                             gReserved1;
  582.     long                             gReserved2;
  583.     long                             gReserved3;
  584.     long                             clientData;
  585.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  586.     RecordIDPtr                     userRecord;                    /* <--  OCE name(Record) of the user */
  587. };
  588. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  589.  
  590.  
  591. /*
  592. kAuthAddKey:
  593. userRecord will contain the user information whose identity has to be
  594. created. userKey will point to the key to be created. password points to
  595. an RString containing the password used to generate the key.
  596. */
  597. struct AuthAddKeyPB {
  598.     void *                            qLink;
  599.     long                             reserved1;
  600.     long                             reserved2;
  601.     AuthIOCompletionUPP             ioCompletion;
  602.     OSErr                             ioResult;
  603.     unsigned long                     saveA5;
  604.     short                             reqCode;
  605.     long                             reserved[2];
  606.     AddrBlock                         serverHint;
  607.     short                             dsRefNum;
  608.     unsigned long                     callID;
  609.     AuthIdentity                     identity;
  610.     long                             gReserved1;
  611.     long                             gReserved2;
  612.     long                             gReserved3;
  613.     long                             clientData;
  614.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  615.     AuthKeyPtr                         userKey;                    /* <--  OCE Key for the user */
  616.     RStringPtr                         password;                    /*  --> Pointer to password string */
  617. };
  618. typedef struct AuthAddKeyPB AuthAddKeyPB;
  619.  
  620. /*
  621. kAuthChangeKey:
  622. userRecord will contain the user information whose identity has to be
  623. created. userKey will point to the key to be created. password points to
  624. an RString containing the password used to generate the key.
  625. */
  626. struct AuthChangeKeyPB {
  627.     void *                            qLink;
  628.     long                             reserved1;
  629.     long                             reserved2;
  630.     AuthIOCompletionUPP             ioCompletion;
  631.     OSErr                             ioResult;
  632.     unsigned long                     saveA5;
  633.     short                             reqCode;
  634.     long                             reserved[2];
  635.     AddrBlock                         serverHint;
  636.     short                             dsRefNum;
  637.     unsigned long                     callID;
  638.     AuthIdentity                     identity;
  639.     long                             gReserved1;
  640.     long                             gReserved2;
  641.     long                             gReserved3;
  642.     long                             clientData;
  643.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  644.     AuthKeyPtr                         userKey;                    /* <--  New OCE Key for the user */
  645.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  646. };
  647. typedef struct AuthChangeKeyPB AuthChangeKeyPB;
  648.  
  649. /*
  650. AuthDeleteKey:
  651. userRecord will contain the user information whose Key has to be deleted.
  652. */
  653. struct AuthDeleteKeyPB {
  654.     void *                            qLink;
  655.     long                             reserved1;
  656.     long                             reserved2;
  657.     AuthIOCompletionUPP             ioCompletion;
  658.     OSErr                             ioResult;
  659.     unsigned long                     saveA5;
  660.     short                             reqCode;
  661.     long                             reserved[2];
  662.     AddrBlock                         serverHint;
  663.     short                             dsRefNum;
  664.     unsigned long                     callID;
  665.     AuthIdentity                     identity;
  666.     long                             gReserved1;
  667.     long                             gReserved2;
  668.     long                             gReserved3;
  669.     long                             clientData;
  670.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  671. };
  672. typedef struct AuthDeleteKeyPB AuthDeleteKeyPB;
  673.  
  674. /* AuthPasswordToKey: Converts an RString into a key. */
  675. struct AuthPasswordToKeyPB {
  676.     void *                            qLink;
  677.     long                             reserved1;
  678.     long                             reserved2;
  679.     AuthIOCompletionUPP             ioCompletion;
  680.     OSErr                             ioResult;
  681.     unsigned long                     saveA5;
  682.     short                             reqCode;
  683.     long                             reserved[2];
  684.     AddrBlock                         serverHint;
  685.     short                             dsRefNum;
  686.     unsigned long                     callID;
  687.     AuthIdentity                     identity;
  688.     long                             gReserved1;
  689.     long                             gReserved2;
  690.     long                             gReserved3;
  691.     long                             clientData;
  692.     RecordIDPtr                     userRecord;                    /*  --> OCE name(Record) of the user */
  693.     AuthKeyPtr                         key;                        /* <--  */
  694.     RStringPtr                         password;                    /*  -->Pointer to the new password string */
  695. };
  696. typedef struct AuthPasswordToKeyPB AuthPasswordToKeyPB;
  697.  
  698. /*
  699. kAuthGetCredentials:
  700. userRecord will contain the user information whose identity has to be
  701. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  702. be deleted.
  703. */
  704. struct AuthGetCredentialsPB {
  705.     void *                            qLink;
  706.     long                             reserved1;
  707.     long                             reserved2;
  708.     AuthIOCompletionUPP             ioCompletion;
  709.     OSErr                             ioResult;
  710.     unsigned long                     saveA5;
  711.     short                             reqCode;
  712.     long                             reserved[2];
  713.     AddrBlock                         serverHint;
  714.     short                             dsRefNum;
  715.     unsigned long                     callID;
  716.     AuthIdentity                     identity;
  717.     long                             gReserved1;
  718.     long                             gReserved2;
  719.     long                             gReserved3;
  720.     long                             clientData;
  721.     AuthIdentity                     userIdentity;                /*  --> identity of initiator */
  722.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  723.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  724.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  725.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  726.     void *                            credentials;                /* <--  buffer where credentials are returned */
  727. };
  728. typedef struct AuthGetCredentialsPB AuthGetCredentialsPB;
  729.  
  730. /*
  731. AuthDecryptCredentialsPB:
  732. Changes:
  733. userKey is changed userIdentity.
  734. userRecord is changed to initiatorRecord. User must supply buffer
  735. to hold initiatorRecord.
  736. agentList has changed to agent. There wil be no call back.
  737. User must supply buffer to hold agent Record.
  738. An additional boolean parameter 'hasAgent' is included.
  739. Toolbox will set this if an 'Agent' record is found in the
  740. credentials. If RecordIDPtr is 'nil', no agent record will
  741. be copied. However user can examine 'hasAgent', If true user
  742. can reissue this call with apprpriate buffer for getting a recordID.
  743. agent has changed to intermediary.  User must supply buffer to hold 
  744. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  745. 'intermediary' record is found in the credentials. 
  746. */
  747. struct AuthDecryptCredentialsPB {
  748.     void *                            qLink;
  749.     long                             reserved1;
  750.     long                             reserved2;
  751.     AuthIOCompletionUPP             ioCompletion;
  752.     OSErr                             ioResult;
  753.     unsigned long                     saveA5;
  754.     short                             reqCode;
  755.     long                             reserved[2];
  756.     AddrBlock                         serverHint;
  757.     short                             dsRefNum;
  758.     unsigned long                     callID;
  759.     AuthIdentity                     identity;
  760.     long                             gReserved1;
  761.     long                             gReserved2;
  762.     long                             gReserved3;
  763.     long                             clientData;
  764.     AuthIdentity                     userIdentity;                /*  --> user's Identity */
  765.     RecordIDPtr                     initiatorRecord;            /* <--  OCE name of the initiator */
  766.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  767.     UTCTime                         expiry;                        /* <--  credentials expiry time */
  768.     unsigned long                     credentialsLength;            /*  --> actual credentials size */
  769.     void *                            credentials;                /*  --> credentials to be decrypted */
  770.     UTCTime                         issueTime;                    /* <--  credentials expiry time */
  771.     Boolean                         hasIntermediary;            /* <--  if true, An intermediary Record was found in credentials */
  772.     Boolean                         filler1;
  773.     RecordIDPtr                     intermediary;                /* <--  recordID of the intermediary */
  774. };
  775. typedef struct AuthDecryptCredentialsPB AuthDecryptCredentialsPB;
  776.  
  777.  
  778. struct AuthMakeChallengePB {
  779.     void *                            qLink;
  780.     long                             reserved1;
  781.     long                             reserved2;
  782.     AuthIOCompletionUPP             ioCompletion;
  783.     OSErr                             ioResult;
  784.     unsigned long                     saveA5;
  785.     short                             reqCode;
  786.     long                             reserved[2];
  787.     AddrBlock                         serverHint;
  788.     short                             dsRefNum;
  789.     unsigned long                     callID;
  790.     AuthIdentity                     identity;
  791.     long                             gReserved1;
  792.     long                             gReserved2;
  793.     long                             gReserved3;
  794.     long                             clientData;
  795.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  796.     void *                            challenge;                    /* <--  Encrypted Challenge */
  797.     unsigned long                     challengeBufferLength;        /*  ->length of challenge buffer */
  798.     unsigned long                     challengeLength;            /*  <-length of Encrypted Challenge */
  799. };
  800. typedef struct AuthMakeChallengePB AuthMakeChallengePB;
  801.  
  802. struct AuthMakeReplyPB {
  803.     void *                            qLink;
  804.     long                             reserved1;
  805.     long                             reserved2;
  806.     AuthIOCompletionUPP             ioCompletion;
  807.     OSErr                             ioResult;
  808.     unsigned long                     saveA5;
  809.     short                             reqCode;
  810.     long                             reserved[2];
  811.     AddrBlock                         serverHint;
  812.     short                             dsRefNum;
  813.     unsigned long                     callID;
  814.     AuthIdentity                     identity;
  815.     long                             gReserved1;
  816.     long                             gReserved2;
  817.     long                             gReserved3;
  818.     long                             clientData;
  819.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  820.     void *                            challenge;                    /*  --> Encrypted Challenge */
  821.     void *                            reply;                        /* <--  Encrypted Reply */
  822.     unsigned long                     replyBufferLength;            /*  -->length of challenge buffer */
  823.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  824.     unsigned long                     replyLength;                /* <--  length of Encrypted Reply */
  825. };
  826. typedef struct AuthMakeReplyPB AuthMakeReplyPB;
  827.  
  828. struct AuthVerifyReplyPB {
  829.     void *                            qLink;
  830.     long                             reserved1;
  831.     long                             reserved2;
  832.     AuthIOCompletionUPP             ioCompletion;
  833.     OSErr                             ioResult;
  834.     unsigned long                     saveA5;
  835.     short                             reqCode;
  836.     long                             reserved[2];
  837.     AddrBlock                         serverHint;
  838.     short                             dsRefNum;
  839.     unsigned long                     callID;
  840.     AuthIdentity                     identity;
  841.     long                             gReserved1;
  842.     long                             gReserved2;
  843.     long                             gReserved3;
  844.     long                             clientData;
  845.     AuthKeyPtr                         key;                        /*  --> UnEncrypted SessionKey */
  846.     void *                            challenge;                    /*  --> Encrypted Challenge */
  847.     void *                            reply;                        /*  --> Encrypted Reply */
  848.     unsigned long                     challengeLength;            /*  --> length of Encrypted Challenge */
  849.     unsigned long                     replyLength;                /*  --> length of Encrypted Reply */
  850. };
  851. typedef struct AuthVerifyReplyPB AuthVerifyReplyPB;
  852.  
  853.  
  854.  
  855. /*
  856. kAuthGetUTCTime:
  857. RLI will contain a valid RLI for a cluster server.
  858. UTC(GMT) time from one of the cluster server will be returned.
  859. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  860. If RLI is nil Map DA is used to determine UTC(GMT).
  861. Mac Local Time = theUTCTime + theUTCOffset.
  862. */
  863. struct AuthGetUTCTimePB {
  864.     void *                            qLink;
  865.     long                             reserved1;
  866.     long                             reserved2;
  867.     AuthIOCompletionUPP             ioCompletion;
  868.     OSErr                             ioResult;
  869.     unsigned long                     saveA5;
  870.     short                             reqCode;
  871.     long                             reserved[2];
  872.     AddrBlock                         serverHint;
  873.     short                             dsRefNum;
  874.     unsigned long                     callID;
  875.     AuthIdentity                     identity;
  876.     long                             gReserved1;
  877.     long                             gReserved2;
  878.     long                             gReserved3;
  879.     long                             clientData;
  880.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI of the Node, whose server's UTC is requested */
  881.     UTCTime                         theUTCTime;                    /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  882.     UTCOffset                         theUTCOffset;                /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  883. };
  884. typedef struct AuthGetUTCTimePB AuthGetUTCTimePB;
  885.  
  886.  
  887. /*
  888. kAuthMakeProxy:
  889. A user represented bu the 'userIdentity' can make a proxy using this call.
  890. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  891. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  892. 'firstValid' is time at which proxy becomes valid.
  893. 'expiry' is the time at which proxy must expire.
  894. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  895. When the call completes, it will hold the actual length of proxy. If the
  896. call completes 'kOCEMoreData' error, client can reissue the call with the
  897. buffer size as 'proxyLength' returned.
  898. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  899. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  900. for the server using TradeProxyForCredentials call.
  901. authDataLength and authData are intended for possible future work, but are
  902. ignored for now.
  903. */
  904. struct AuthMakeProxyPB {
  905.     void *                            qLink;
  906.     long                             reserved1;
  907.     long                             reserved2;
  908.     AuthIOCompletionUPP             ioCompletion;
  909.     OSErr                             ioResult;
  910.     unsigned long                     saveA5;
  911.     short                             reqCode;
  912.     long                             reserved[2];
  913.     AddrBlock                         serverHint;
  914.     short                             dsRefNum;
  915.     unsigned long                     callID;
  916.     AuthIdentity                     identity;
  917.     long                             gReserved1;
  918.     long                             gReserved2;
  919.     long                             gReserved3;
  920.     long                             clientData;
  921.     AuthIdentity                     userIdentity;                /*  --> identity of principal */
  922.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  923.     UTCTime                         firstValid;                    /*  --> time at which proxy becomes valid */
  924.     UTCTime                         expiry;                        /*  --> time at which proxy expires */
  925.     unsigned long                     authDataLength;                /*  --> size of authorization data */
  926.     void *                            authData;                    /*  --> pointer to authorization data */
  927.     unsigned long                     proxyLength;                /* <--> max/actual proxy size */
  928.     void *                            proxy;                        /* <--> buffer where proxy is returned */
  929.     RecordIDPtr                     intermediary;                /*  --> RecordID of intermediary */
  930. };
  931. typedef struct AuthMakeProxyPB AuthMakeProxyPB;
  932.  
  933. /*
  934. kAuthTradeProxyForCredentials:
  935. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  936. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  937. 'recipient' is the RecordID for whom credetials are requested.
  938. 'principal' is the RecordID of the user who created the proxy.
  939. 'proxyLength' is the length of data pointed by 'proxy.
  940. If the call is succesfull, credentials will be returned in the
  941. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  942. When call succeds this will have expiry time of credentials.
  943. This is very similar to GetCredentials except that we (of course) need the proxy,
  944. but we also need the name of the principal who created the proxy.
  945. */
  946. struct AuthTradeProxyForCredentialsPB {
  947.     void *                            qLink;
  948.     long                             reserved1;
  949.     long                             reserved2;
  950.     AuthIOCompletionUPP             ioCompletion;
  951.     OSErr                             ioResult;
  952.     unsigned long                     saveA5;
  953.     short                             reqCode;
  954.     long                             reserved[2];
  955.     AddrBlock                         serverHint;
  956.     short                             dsRefNum;
  957.     unsigned long                     callID;
  958.     AuthIdentity                     identity;
  959.     long                             gReserved1;
  960.     long                             gReserved2;
  961.     long                             gReserved3;
  962.     long                             clientData;
  963.     AuthIdentity                     userIdentity;                /*  --> identity of intermediary */
  964.     RecordIDPtr                     recipient;                    /*  --> OCE name of recipient */
  965.     AuthKeyPtr                         sessionKey;                    /* <--  session key */
  966.     UTCTime                         expiry;                        /* <--> desired/actual expiry */
  967.     unsigned long                     credentialsLength;            /* <--> max/actual credentials size */
  968.     void *                            credentials;                /* <--> buffer where credentials are returned */
  969.     unsigned long                     proxyLength;                /*  --> actual proxy size */
  970.     void *                            proxy;                        /*  --> buffer containing proxy */
  971.     RecordIDPtr                     principal;                    /*  --> RecordID of principal */
  972. };
  973. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  974.  
  975. /* API for Local Identity Interface */
  976. /*
  977. AuthGetLocalIdentityPB:
  978. A Collaborative application intended to work under the umbrella of LocalIdentity
  979. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  980. If LocalIdentity has not been setup, then application will get
  981. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  982. recommended by the OCE Setup document and guide the user through OCE Setup.
  983. If the OCESetup contains local identity, but user has not unlocked, it will get
  984. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  985. to prompt user for the password.
  986. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  987. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  988. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  989. when a LocalIdentity gets created by a foreground application.
  990. */
  991. struct AuthGetLocalIdentityPB {
  992.     void *                            qLink;
  993.     long                             reserved1;
  994.     long                             reserved2;
  995.     AuthIOCompletionUPP             ioCompletion;
  996.     OSErr                             ioResult;
  997.     unsigned long                     saveA5;
  998.     short                             reqCode;
  999.     long                             reserved[2];
  1000.     AddrBlock                         serverHint;
  1001.     short                             dsRefNum;
  1002.     unsigned long                     callID;
  1003.     AuthIdentity                     identity;
  1004.     long                             gReserved1;
  1005.     long                             gReserved2;
  1006.     long                             gReserved3;
  1007.     long                             clientData;
  1008.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1009. };
  1010. typedef struct AuthGetLocalIdentityPB AuthGetLocalIdentityPB;
  1011.  
  1012. /*
  1013. kAuthUnlockLocalIdentity:
  1014. The LocalIdentity can be created using this call.
  1015. The userName and password correspond to the LocalIdentity setup.
  1016. If the password matches, then collabIdentity will be returned.
  1017. Typically SDPPromptForLocalIdentity call will make this call.
  1018. All applications which are registered through kAuthAddToLocalIdentityQueue
  1019. will be notified.
  1020. */
  1021. struct AuthUnlockLocalIdentityPB {
  1022.     void *                            qLink;
  1023.     long                             reserved1;
  1024.     long                             reserved2;
  1025.     AuthIOCompletionUPP             ioCompletion;
  1026.     OSErr                             ioResult;
  1027.     unsigned long                     saveA5;
  1028.     short                             reqCode;
  1029.     long                             reserved[2];
  1030.     AddrBlock                         serverHint;
  1031.     short                             dsRefNum;
  1032.     unsigned long                     callID;
  1033.     AuthIdentity                     identity;
  1034.     long                             gReserved1;
  1035.     long                             gReserved2;
  1036.     long                             gReserved3;
  1037.     long                             clientData;
  1038.     LocalIdentity                     theLocalIdentity;            /* <--  LocalIdentity */
  1039.     RStringPtr                         userName;                    /*  --> userName */
  1040.     RStringPtr                         password;                    /*  -->user password */
  1041. };
  1042. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  1043.  
  1044. /*
  1045. kAuthLockLocalIdentity:
  1046. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1047. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1048. denied the operation. This name will be supplied by the application
  1049. when it registered through kAuthAddToLocalIdentityQueue call
  1050. */
  1051. struct AuthLockLocalIdentityPB {
  1052.     void *                            qLink;
  1053.     long                             reserved1;
  1054.     long                             reserved2;
  1055.     AuthIOCompletionUPP             ioCompletion;
  1056.     OSErr                             ioResult;
  1057.     unsigned long                     saveA5;
  1058.     short                             reqCode;
  1059.     long                             reserved[2];
  1060.     AddrBlock                         serverHint;
  1061.     short                             dsRefNum;
  1062.     unsigned long                     callID;
  1063.     AuthIdentity                     identity;
  1064.     long                             gReserved1;
  1065.     long                             gReserved2;
  1066.     long                             gReserved3;
  1067.     long                             clientData;
  1068.     LocalIdentity                     theLocalIdentity;            /*  --> LocalIdentity */
  1069.     StringPtr                         name;                        /* <--  name of the app which denied delete */
  1070. };
  1071. typedef struct AuthLockLocalIdentityPB AuthLockLocalIdentityPB;
  1072.  
  1073. typedef CALLBACK_API( Boolean , NotificationProcPtr )(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  1074. typedef STACK_UPP_TYPE(NotificationProcPtr)                     NotificationUPP;
  1075. typedef NotificationUPP                 NotificationProc;
  1076. /*
  1077. kAuthAddToLocalIdentityQueue:
  1078. An application requiring notification of locking/unlocking of the
  1079. LocalIdentity can install itself using this call. The function provided
  1080. in 'notifyProc' will be called whenever the requested event happens.
  1081. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1082. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1083. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1084. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1085. (registered with the notificationProc) of the application which denied locking is also
  1086. returned to the caller making the AuthLockIdentity call.
  1087. */
  1088. struct AuthAddToLocalIdentityQueuePB {
  1089.     void *                            qLink;
  1090.     long                             reserved1;
  1091.     long                             reserved2;
  1092.     AuthIOCompletionUPP             ioCompletion;
  1093.     OSErr                             ioResult;
  1094.     unsigned long                     saveA5;
  1095.     short                             reqCode;
  1096.     long                             reserved[2];
  1097.     AddrBlock                         serverHint;
  1098.     short                             dsRefNum;
  1099.     unsigned long                     callID;
  1100.     AuthIdentity                     identity;
  1101.     long                             gReserved1;
  1102.     long                             gReserved2;
  1103.     long                             gReserved3;
  1104.     long                             clientData;
  1105.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1106.     AuthNotifications                 notifyFlags;                /*  --> notifyFlags */
  1107.     StringPtr                         appName;                    /*  --> name of application to be returned in Delete/Stop */
  1108. };
  1109. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  1110.  
  1111. /*
  1112. kAuthRemoveFromLocalIdentityQueue:*/
  1113. struct AuthRemoveFromLocalIdentityQueuePB {
  1114.     void *                            qLink;
  1115.     long                             reserved1;
  1116.     long                             reserved2;
  1117.     AuthIOCompletionUPP             ioCompletion;
  1118.     OSErr                             ioResult;
  1119.     unsigned long                     saveA5;
  1120.     short                             reqCode;
  1121.     long                             reserved[2];
  1122.     AddrBlock                         serverHint;
  1123.     short                             dsRefNum;
  1124.     unsigned long                     callID;
  1125.     AuthIdentity                     identity;
  1126.     long                             gReserved1;
  1127.     long                             gReserved2;
  1128.     long                             gReserved3;
  1129.     long                             clientData;
  1130.     NotificationUPP                 notifyProc;                    /*  --> notification procedure */
  1131. };
  1132. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  1133.  
  1134. /*
  1135. kAuthSetupLocalIdentity:
  1136. The LocalIdentity can be Setup using this call.
  1137. The userName and password correspond to the LocalIdentity setup.
  1138. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1139. will be returned.
  1140. */
  1141. struct AuthSetupLocalIdentityPB {
  1142.     void *                            qLink;
  1143.     long                             reserved1;
  1144.     long                             reserved2;
  1145.     AuthIOCompletionUPP             ioCompletion;
  1146.     OSErr                             ioResult;
  1147.     unsigned long                     saveA5;
  1148.     short                             reqCode;
  1149.     long                             reserved[2];
  1150.     AddrBlock                         serverHint;
  1151.     short                             dsRefNum;
  1152.     unsigned long                     callID;
  1153.     AuthIdentity                     identity;
  1154.     long                             gReserved1;
  1155.     long                             gReserved2;
  1156.     long                             gReserved3;
  1157.     long                             clientData;
  1158.     long                             aReserved;                    /*  --  */
  1159.     RStringPtr                         userName;                    /*  --> userName */
  1160.     RStringPtr                         password;                    /*  -->user password */
  1161. };
  1162. typedef struct AuthSetupLocalIdentityPB AuthSetupLocalIdentityPB;
  1163.  
  1164. /*
  1165. kAuthChangeLocalIdentity:
  1166. An existing LocalIdentity  Setup can be changed using this call.
  1167. The userName and password correspond to the LocalIdentity setup.
  1168. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1169. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1170. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1171. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1172. password as 'newPassword' and if any applications has installed into 
  1173. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1174. kAuthLocalIdentityNameChangeOp action value. 
  1175.  
  1176. */
  1177. struct AuthChangeLocalIdentityPB {
  1178.     void *                            qLink;
  1179.     long                             reserved1;
  1180.     long                             reserved2;
  1181.     AuthIOCompletionUPP             ioCompletion;
  1182.     OSErr                             ioResult;
  1183.     unsigned long                     saveA5;
  1184.     short                             reqCode;
  1185.     long                             reserved[2];
  1186.     AddrBlock                         serverHint;
  1187.     short                             dsRefNum;
  1188.     unsigned long                     callID;
  1189.     AuthIdentity                     identity;
  1190.     long                             gReserved1;
  1191.     long                             gReserved2;
  1192.     long                             gReserved3;
  1193.     long                             clientData;
  1194.     long                             aReserved;                    /*  --  */
  1195.     RStringPtr                         userName;                    /*  --> userName */
  1196.     RStringPtr                         password;                    /*  --> current password */
  1197.     RStringPtr                         newPassword;                /*  --> new password */
  1198. };
  1199. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  1200.  
  1201. /*
  1202. kAuthRemoveLocalIdentity:
  1203. An existing LocalIdentity  Setup can be removed using this call.
  1204. The userName and password correspond to the LocalIdentity setup.
  1205. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1206. will be returned.
  1207. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1208. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1209. This is a very distructive operation, user must be warned enough before actually making
  1210. this call.
  1211. */
  1212. struct AuthRemoveLocalIdentityPB {
  1213.     void *                            qLink;
  1214.     long                             reserved1;
  1215.     long                             reserved2;
  1216.     AuthIOCompletionUPP             ioCompletion;
  1217.     OSErr                             ioResult;
  1218.     unsigned long                     saveA5;
  1219.     short                             reqCode;
  1220.     long                             reserved[2];
  1221.     AddrBlock                         serverHint;
  1222.     short                             dsRefNum;
  1223.     unsigned long                     callID;
  1224.     AuthIdentity                     identity;
  1225.     long                             gReserved1;
  1226.     long                             gReserved2;
  1227.     long                             gReserved3;
  1228.     long                             clientData;
  1229.     long                             aReserved;                    /*  --  */
  1230.     RStringPtr                         userName;                    /*  --> userName */
  1231.     RStringPtr                         password;                    /*  --> current password */
  1232. };
  1233. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  1234.  
  1235. /*
  1236. kOCESetupAddDirectoryInfo:
  1237. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1238. ASCreateLocalIdentity should have been done succesfully before making this call.    
  1239. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1240. DirAddDSAMDirectory call was made.
  1241. rid-> is the recordID in which the identity for the catalog will be established.
  1242. password-> the password associated with the rid in the catalog world.
  1243. */
  1244. struct OCESetupAddDirectoryInfoPB {
  1245.     void *                            qLink;
  1246.     long                             reserved1;
  1247.     long                             reserved2;
  1248.     AuthIOCompletionUPP             ioCompletion;
  1249.     OSErr                             ioResult;
  1250.     unsigned long                     saveA5;
  1251.     short                             reqCode;
  1252.     long                             reserved[2];
  1253.     AddrBlock                         serverHint;
  1254.     short                             dsRefNum;
  1255.     unsigned long                     callID;
  1256.     AuthIdentity                     identity;
  1257.     long                             gReserved1;
  1258.     long                             gReserved2;
  1259.     long                             gReserved3;
  1260.     long                             clientData;
  1261.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1262.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1263.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1264. };
  1265. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  1266.  
  1267. /*
  1268. kOCESetupChangeDirectoryInfo:
  1269. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1270. can be changed.
  1271. ASCreateLocalIdentity should have been done succesfully before making this call.
  1272. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1273. DirAddDSAMDirectory call was made.
  1274. rid-> is the recordID in which the identity for the catalog will be established.
  1275. password-> the password associated with the rid in the catalog world.
  1276. newPassword -> the new password for the catalog
  1277. */
  1278. struct OCESetupChangeDirectoryInfoPB {
  1279.     void *                            qLink;
  1280.     long                             reserved1;
  1281.     long                             reserved2;
  1282.     AuthIOCompletionUPP             ioCompletion;
  1283.     OSErr                             ioResult;
  1284.     unsigned long                     saveA5;
  1285.     short                             reqCode;
  1286.     long                             reserved[2];
  1287.     AddrBlock                         serverHint;
  1288.     short                             dsRefNum;
  1289.     unsigned long                     callID;
  1290.     AuthIdentity                     identity;
  1291.     long                             gReserved1;
  1292.     long                             gReserved2;
  1293.     long                             gReserved3;
  1294.     long                             clientData;
  1295.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1296.     RecordIDPtr                     recordID;                    /*  --> recordID for the identity */
  1297.     RStringPtr                         password;                    /*  --> password in the catalog world */
  1298.     RStringPtr                         newPassword;                /*  --> new password in the catalog */
  1299. };
  1300. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  1301.  
  1302. /*
  1303. kOCESetupRemoveDirectoryInfo:
  1304. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1305. can be changed.
  1306. ASCreateLocalIdentity should have been done succesfully before making this call.
  1307. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1308. */
  1309. struct OCESetupRemoveDirectoryInfoPB {
  1310.     void *                            qLink;
  1311.     long                             reserved1;
  1312.     long                             reserved2;
  1313.     AuthIOCompletionUPP             ioCompletion;
  1314.     OSErr                             ioResult;
  1315.     unsigned long                     saveA5;
  1316.     short                             reqCode;
  1317.     long                             reserved[2];
  1318.     AddrBlock                         serverHint;
  1319.     short                             dsRefNum;
  1320.     unsigned long                     callID;
  1321.     AuthIdentity                     identity;
  1322.     long                             gReserved1;
  1323.     long                             gReserved2;
  1324.     long                             gReserved3;
  1325.     long                             clientData;
  1326.     CreationID                         directoryRecordCID;            /*  --> CreationID for the catalog */
  1327. };
  1328. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  1329.  
  1330. /*
  1331. kOCESetupGetDirectoryInfo:
  1332. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1333. can be obtained.
  1334. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1335. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1336. 'password' will be returned  for  non-ADAP Catalogs.
  1337. */
  1338. struct OCESetupGetDirectoryInfoPB {
  1339.     void *                            qLink;
  1340.     long                             reserved1;
  1341.     long                             reserved2;
  1342.     AuthIOCompletionUPP             ioCompletion;
  1343.     OSErr                             ioResult;
  1344.     unsigned long                     saveA5;
  1345.     short                             reqCode;
  1346.     long                             reserved[2];
  1347.     AddrBlock                         serverHint;
  1348.     short                             dsRefNum;
  1349.     unsigned long                     callID;
  1350.     AuthIdentity                     identity;
  1351.     long                             gReserved1;
  1352.     long                             gReserved2;
  1353.     long                             gReserved3;
  1354.     long                             clientData;
  1355.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  1356.     DirDiscriminator                 discriminator;                /*  --> discriminator for the catalog */
  1357.     RecordIDPtr                     recordID;                    /* <--  rid for the catalog identity */
  1358.     RStringPtr                         nativeName;                    /* <--  user name in the catalog world */
  1359.     RStringPtr                         password;                    /* <--  password in the catalog world */
  1360. };
  1361. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1362.  
  1363. /*****************************************************************************
  1364.  
  1365.  
  1366.          Catalog Manager operations
  1367.  
  1368.  
  1369. *****************************************************************************/
  1370. typedef union DirParamBlock             DirParamBlock;
  1371. typedef DirParamBlock *                    DirParamBlockPtr;
  1372. typedef CALLBACK_API( void , DirIOCompletionProcPtr )(DirParamBlockPtr paramBlock);
  1373. /*
  1374.     WARNING: DirIOCompletionProcPtr uses register based parameters under classic 68k
  1375.              and cannot be written in a high-level language without 
  1376.              the help of mixed mode or assembly glue.
  1377. */
  1378. typedef REGISTER_UPP_TYPE(DirIOCompletionProcPtr)                 DirIOCompletionUPP;
  1379. /* AddRecord */
  1380. struct DirAddRecordPB {
  1381.     void *                            qLink;
  1382.     long                             reserved1;
  1383.     long                             reserved2;
  1384.     DirIOCompletionUPP                 ioCompletion;
  1385.     OSErr                             ioResult;
  1386.     unsigned long                     saveA5;
  1387.     short                             reqCode;
  1388.     long                             reserved[2];
  1389.     AddrBlock                         serverHint;
  1390.     short                             dsRefNum;
  1391.     unsigned long                     callID;
  1392.     AuthIdentity                     identity;
  1393.     long                             gReserved1;
  1394.     long                             gReserved2;
  1395.     long                             gReserved3;
  1396.     long                             clientData;
  1397.     RecordIDPtr                     aRecord;                    /*  --> CreationID returned here */
  1398.     Boolean                         allowDuplicate;                /*  --> */
  1399.     Boolean                         filler1;
  1400. };
  1401. typedef struct DirAddRecordPB DirAddRecordPB;
  1402.  
  1403.  
  1404.  
  1405. /* DeleteRecord */
  1406. struct DirDeleteRecordPB {
  1407.     void *                            qLink;
  1408.     long                             reserved1;
  1409.     long                             reserved2;
  1410.     DirIOCompletionUPP                 ioCompletion;
  1411.     OSErr                             ioResult;
  1412.     unsigned long                     saveA5;
  1413.     short                             reqCode;
  1414.     long                             reserved[2];
  1415.     AddrBlock                         serverHint;
  1416.     short                             dsRefNum;
  1417.     unsigned long                     callID;
  1418.     AuthIdentity                     identity;
  1419.     long                             gReserved1;
  1420.     long                             gReserved2;
  1421.     long                             gReserved3;
  1422.     long                             clientData;
  1423.     RecordIDPtr                     aRecord;                    /*  --> */
  1424. };
  1425. typedef struct DirDeleteRecordPB DirDeleteRecordPB;
  1426.  
  1427. /* aRecord must contain valid PackedRLI and a CreationID. */
  1428.  
  1429.  
  1430. /**********************************************************************************/
  1431. /*
  1432. DirEnumerate:
  1433. This call can be used to enumerate both DNodes and records under a specified
  1434. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1435.  
  1436. startingPoint indicates where to start the enumeration.  Initially,
  1437. it should be set to a value of nil.  After some records are enumerated,
  1438. the client can issue the call again with the same aRLI and recordName and
  1439. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1440. will continue the enumeration from that record on. if user wants to get back the
  1441. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1442. must be set to 'true'. If this is set to 'false', records specified after the
  1443. startingPoint record will be returned.
  1444.  
  1445. sortBy indicates to the server to return the records that match in name-first
  1446. or type-first order.  sortDirection indicates to the server to search in forward
  1447. or backward sort order for RecordIDs Specified.
  1448.  
  1449. RecordIDS and Enumeration Criteria:
  1450.  
  1451. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1452. specification.
  1453.  
  1454. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1455. specify a wild card in the name. WildCard specification is specified in 
  1456. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1457.  
  1458. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1459.  
  1460. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1461.  
  1462. If 'typeCount' is exactly equal to one, a wild card can be specified
  1463. for the entity type; otherwise types have to be completely specified.
  1464. WildCard specification is specified in  matchNameHow parameter
  1465.  and possible values are defined in DirMatchWith Enum.
  1466.  
  1467.  
  1468. A nil value for 'startingPoint' is allowed when sortDirection specified
  1469. is 'kSortBackwards'. This was not allowed previously.
  1470.  
  1471. 'enumFlags' parameter is a bit field. The following bits can be set:
  1472.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1473.     kEnumAliasMask to get back record aliases
  1474.     kEnumPseudonymMask to get back record pseudonyms
  1475.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1476.     'aRLI' parameter.
  1477.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1478.     dNode specified in the 'aRLI' parameter.
  1479.  
  1480.     kEnumAll is combination of all five values and can be used to enumerate
  1481.     everything under a specified DNode.
  1482.  
  1483.  
  1484.  
  1485. The results returned for each element will consist of a DirEnumSpec.
  1486. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1487. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1488. The 'enumFlag'  will indicate whether the returned element is a
  1489. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1490. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1491. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1492. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1493. this will be set to zero). The name will be the child dnode name. For other values of the
  1494. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1495. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1496. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1497. may also return the relative position of the record (percentile of total records) in the 
  1498. indexRatio field in EnumSpec.
  1499.  
  1500.  
  1501. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1502. The results will be collected in the 'getBuffer' supplied by the user.
  1503. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1504.  
  1505. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1506. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1507. */
  1508.  
  1509. struct DirEnumerateGetPB {
  1510.     void *                            qLink;
  1511.     long                             reserved1;
  1512.     long                             reserved2;
  1513.     DirIOCompletionUPP                 ioCompletion;
  1514.     OSErr                             ioResult;
  1515.     unsigned long                     saveA5;
  1516.     short                             reqCode;
  1517.     long                             reserved[2];
  1518.     AddrBlock                         serverHint;
  1519.     short                             dsRefNum;
  1520.     unsigned long                     callID;
  1521.     AuthIdentity                     identity;
  1522.     long                             gReserved1;
  1523.     long                             gReserved2;
  1524.     long                             gReserved3;
  1525.     long                             clientData;
  1526.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1527.     DirEnumSpec *                    startingPoint;                /*  --> */
  1528.     DirSortOption                     sortBy;                        /*  --> */
  1529.     DirSortDirection                 sortDirection;                /*  --> */
  1530.     long                             dReserved;                    /*  --  */
  1531.     RStringPtr                         nameMatchString;            /*  --> name from which enumeration should start */
  1532.     RStringPtr *                    typesList;                    /*  --> list of entity types to be enumerated */
  1533.     unsigned long                     typeCount;                    /*  --> number of types in the list */
  1534.     DirEnumChoices                     enumFlags;                    /*  --> indicates what to enumerate */
  1535.     Boolean                         includeStartingPoint;        /*  --> if true return the record specified in starting point */
  1536.     Byte                             padByte;
  1537.     DirMatchWith                     matchNameHow;                /*  --> Matching Criteria for nameMatchString */
  1538.     DirMatchWith                     matchTypeHow;                /*  --> Matching Criteria for typeList */
  1539.     void *                            getBuffer;                    /*  --> */
  1540.     unsigned long                     getBufferSize;                /*  --> */
  1541.     SLRV                             responseSLRV;                /*  <--  response SLRV */
  1542. };
  1543. typedef struct DirEnumerateGetPB DirEnumerateGetPB;
  1544.  
  1545. /* The EnumerateRecords call-back function is defined as follows: */
  1546. typedef CALLBACK_API( Boolean , ForEachDirEnumSpecProcPtr )(long clientData, const DirEnumSpec *enumSpec);
  1547. typedef STACK_UPP_TYPE(ForEachDirEnumSpecProcPtr)                 ForEachDirEnumSpecUPP;
  1548. typedef ForEachDirEnumSpecUPP             ForEachDirEnumSpec;
  1549. /*
  1550. EnumerateParse:
  1551. After an EnumerateGet call has completed, call EnumerateParse
  1552. to parse through the buffer that was filled in EnumerateGet.
  1553.  
  1554. 'eachEnumSpec' will be called each time to return to the client a
  1555. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1556. of information returned in the DirEnumSpec
  1557. The clientData parameter that you pass in the parameter block will be passed
  1558. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1559. to allow you some way to match the call-back to the original call (for
  1560. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1561. associate returned results in some way).
  1562.  
  1563. The client should return FALSE from 'eachEnumSpec' to continue
  1564. processing of the EnumerateParse request.  Returning TRUE will
  1565. terminate the EnumerateParse request.
  1566.  
  1567. For synchronous calls, the call-back routine actually runs as part of the same thread
  1568. of execution as the thread that made the EnumerateParse call.  That means that the
  1569. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1570. that were in effect when the call was made.  Because of this, the call-back
  1571. routine has the same restrictions as the caller of EnumerateParse:
  1572. if EnumerateParse was not called from interrupt level, then the call-
  1573. back routine can allocate memory. For asynchronous calls, call-back routine is
  1574. like a ioCompletion except that A5 will be preserved for the application.
  1575. */
  1576. struct DirEnumerateParsePB {
  1577.     void *                            qLink;
  1578.     long                             reserved1;
  1579.     long                             reserved2;
  1580.     DirIOCompletionUPP                 ioCompletion;
  1581.     OSErr                             ioResult;
  1582.     unsigned long                     saveA5;
  1583.     short                             reqCode;
  1584.     long                             reserved[2];
  1585.     AddrBlock                         serverHint;
  1586.     short                             dsRefNum;
  1587.     unsigned long                     callID;
  1588.     AuthIdentity                     identity;
  1589.     long                             gReserved1;
  1590.     long                             gReserved2;
  1591.     long                             gReserved3;
  1592.     long                             clientData;
  1593.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1594.     long                             bReserved;                    /*  --  */
  1595.     long                             cReserved;                    /*  --  */
  1596.     ForEachDirEnumSpec                 eachEnumSpec;                /*  --> */
  1597.     long                             eReserved;                    /*  --  */
  1598.     long                             fReserved;                    /*  --  */
  1599.     long                             gReserved;                    /*  --  */
  1600.     long                             hReserved;                    /*  --  */
  1601.     long                             iReserved;                    /*  --  */
  1602.     void *                            getBuffer;                    /*  --> */
  1603.     unsigned long                     getBufferSize;                /*  --> */
  1604.     short                             l1Reserved;                    /*  -- */
  1605.     short                             l2Reserved;                    /*  --  */
  1606.     short                             l3Reserved;                    /*  -- */
  1607.     short                             l4Reserved;                    /*  --  */
  1608.  
  1609. };
  1610. typedef struct DirEnumerateParsePB DirEnumerateParsePB;
  1611.  
  1612. /*
  1613.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1614.  * of records instead of records local to a cluster.
  1615. */
  1616. struct DirFindRecordGetPB {
  1617.     void *                            qLink;
  1618.     long                             reserved1;
  1619.     long                             reserved2;
  1620.     DirIOCompletionUPP                 ioCompletion;
  1621.     OSErr                             ioResult;
  1622.     unsigned long                     saveA5;
  1623.     short                             reqCode;
  1624.     long                             reserved[2];
  1625.     AddrBlock                         serverHint;
  1626.     short                             dsRefNum;
  1627.     unsigned long                     callID;
  1628.     AuthIdentity                     identity;
  1629.     long                             gReserved1;
  1630.     long                             gReserved2;
  1631.     long                             gReserved3;
  1632.     long                             clientData;
  1633.     RecordIDPtr                     startingPoint;
  1634.     long                             reservedA[2];
  1635.     RStringPtr                         nameMatchString;
  1636.     RStringPtr *                    typesList;
  1637.     unsigned long                     typeCount;
  1638.     long                             reservedB;
  1639.     short                             reservedC;
  1640.     DirMatchWith                     matchNameHow;
  1641.     DirMatchWith                     matchTypeHow;
  1642.     void *                            getBuffer;
  1643.     unsigned long                     getBufferSize;
  1644.     DirectoryNamePtr                 directoryName;
  1645.     DirDiscriminator                 discriminator;
  1646. };
  1647. typedef struct DirFindRecordGetPB DirFindRecordGetPB;
  1648.  
  1649. /* The FindRecordParse call-back function is defined as follows: */
  1650. typedef CALLBACK_API( Boolean , ForEachRecordProcPtr )(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1651. typedef STACK_UPP_TYPE(ForEachRecordProcPtr)                     ForEachRecordUPP;
  1652. typedef ForEachRecordUPP                 ForEachRecord;
  1653. /*
  1654.  * This PB same as DirFindRecordGet except it includes the callback function
  1655. */
  1656. struct DirFindRecordParsePB {
  1657.     void *                            qLink;
  1658.     long                             reserved1;
  1659.     long                             reserved2;
  1660.     DirIOCompletionUPP                 ioCompletion;
  1661.     OSErr                             ioResult;
  1662.     unsigned long                     saveA5;
  1663.     short                             reqCode;
  1664.     long                             reserved[2];
  1665.     AddrBlock                         serverHint;
  1666.     short                             dsRefNum;
  1667.     unsigned long                     callID;
  1668.     AuthIdentity                     identity;
  1669.     long                             gReserved1;
  1670.     long                             gReserved2;
  1671.     long                             gReserved3;
  1672.     long                             clientData;
  1673.     RecordIDPtr                     startingPoint;
  1674.     long                             reservedA[2];
  1675.     RStringPtr                         nameMatchString;
  1676.     RStringPtr *                    typesList;
  1677.     unsigned long                     typeCount;
  1678.     long                             reservedB;
  1679.     short                             reservedC;
  1680.     DirMatchWith                     matchNameHow;
  1681.     DirMatchWith                     matchTypeHow;
  1682.     void *                            getBuffer;
  1683.     unsigned long                     getBufferSize;
  1684.     DirectoryNamePtr                 directoryName;
  1685.     DirDiscriminator                 discriminator;
  1686.     ForEachRecord                     forEachRecordFunc;
  1687.  
  1688. };
  1689. typedef struct DirFindRecordParsePB DirFindRecordParsePB;
  1690.  
  1691.  
  1692.  
  1693. /*
  1694. LookupGet:
  1695.  
  1696. aRecordList is an array of pointers to RecordIDs, each of which must
  1697. contain valid PackedRLI and a CreationID.  recordIDCount is
  1698. the size of this array.
  1699.  
  1700. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1701. the size of this array.
  1702.  
  1703. staringRecordIndex is the record from which to continue the lookup.
  1704. If you want to start from first record in the list, this must be 1 (not zero).
  1705. This value must always be <= recordIDCount.
  1706.  
  1707. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1708. If you want to start from first attribute in the list, this must be 1 (not zero).
  1709. This value must always be <= attrTypeCount.
  1710.  
  1711. startingAttribute is the value of the attribute value from which we want to
  1712. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1713. may contain only a CID. Other catalogs may require the entire value.
  1714. If a non-null cid is given and if an attribute value with that cid is not found, this
  1715. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1716. after getting this error.
  1717.  
  1718. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1719. startingPoint in the results returned. If this is set to 'false', the value
  1720. specified in the startingAttribute will not be returned.
  1721.  
  1722. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1723. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1724. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1725. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1726. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1727. so they can be used in a subsequent LookupGet call to continue the lookup.
  1728.  
  1729. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1730. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1731. into the buffer, the client will not able to proceed further because he will not know the
  1732. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1733. would be needed for the next call to get this 'mondo' attribute value successfully.
  1734.  
  1735. to support this, LookupParse call will do the following:
  1736.  
  1737. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1738. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1739. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1740. However, if it was not even called once, then the attribute value may be too big to fit in the
  1741. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1742. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1743. ForEachAttributeValue was not called because the user does not have read access to some of
  1744. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1745. any of the attribute values.  A kOCEMoreData error is returned.
  1746.  
  1747. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1748. 'daDuplicateRecordIDErr'.
  1749.  
  1750. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1751. return 'daDuplicateAttrTypeErr'.
  1752. */
  1753. struct DirLookupGetPB {
  1754.     void *                            qLink;
  1755.     long                             reserved1;
  1756.     long                             reserved2;
  1757.     DirIOCompletionUPP                 ioCompletion;
  1758.     OSErr                             ioResult;
  1759.     unsigned long                     saveA5;
  1760.     short                             reqCode;
  1761.     long                             reserved[2];
  1762.     AddrBlock                         serverHint;
  1763.     short                             dsRefNum;
  1764.     unsigned long                     callID;
  1765.     AuthIdentity                     identity;
  1766.     long                             gReserved1;
  1767.     long                             gReserved2;
  1768.     long                             gReserved3;
  1769.     long                             clientData;
  1770.     RecordIDPtr *                    aRecordList;                /*  --> an array of RecordID pointers */
  1771.     AttributeTypePtr *                attrTypeList;                /*  --> an array of attribute types */
  1772.     long                             cReserved;                    /*  --  */
  1773.     long                             dReserved;                    /*  --  */
  1774.     long                             eReserved;                    /*  --  */
  1775.     long                             fReserved;                    /*  --  */
  1776.     unsigned long                     recordIDCount;                /*  --> */
  1777.     unsigned long                     attrTypeCount;                /*  --> */
  1778.     Boolean                         includeStartingPoint;        /*  --> if true return the value specified by the starting indices */
  1779.     Byte                             padByte;
  1780.     short                             i1Reserved;                    /*  --  */
  1781.     void *                            getBuffer;                    /*  --> */
  1782.     unsigned long                     getBufferSize;                /*  --> */
  1783.     unsigned long                     startingRecordIndex;        /*  --> start from this record */
  1784.     unsigned long                     startingAttrTypeIndex;        /*  --> start from this attribute type */
  1785.     Attribute                         startingAttribute;            /*  --> start from this attribute value */
  1786.     long                             pReserved;                    /*  --  */
  1787. };
  1788. typedef struct DirLookupGetPB DirLookupGetPB;
  1789.  
  1790. /* The Lookup call-back functions are defined as follows: */
  1791. typedef CALLBACK_API( Boolean , ForEachLookupRecordIDProcPtr )(long clientData, const RecordID *recordID);
  1792. typedef STACK_UPP_TYPE(ForEachLookupRecordIDProcPtr)             ForEachLookupRecordIDUPP;
  1793. typedef ForEachLookupRecordIDUPP         ForEachLookupRecordID;
  1794. typedef CALLBACK_API( Boolean , ForEachAttrTypeLookupProcPtr )(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1795. typedef STACK_UPP_TYPE(ForEachAttrTypeLookupProcPtr)             ForEachAttrTypeLookupUPP;
  1796. typedef ForEachAttrTypeLookupUPP         ForEachAttrTypeLookup;
  1797. typedef CALLBACK_API( Boolean , ForEachAttrValueProcPtr )(long clientData, const Attribute *attribute);
  1798. typedef STACK_UPP_TYPE(ForEachAttrValueProcPtr)                 ForEachAttrValueUPP;
  1799. typedef ForEachAttrValueUPP             ForEachAttrValue;
  1800. /*
  1801. LookupParse:
  1802.  
  1803. After a LookupGet call has completed, call LookupParse
  1804. to parse through the buffer that was filled in LookupGet.  The
  1805. toolbox will parse through the buffer and call the appropriate call-back routines
  1806. for each item in the getBuffer.
  1807.  
  1808. 'eachRecordID' will be called each time to return to the client one of the
  1809. RecordIDs from aRecordList.  The clientData parameter that you
  1810. pass in the parameter block will be passed to eachRecordID.
  1811. You are free to put anything in clientData - it is intended to allow
  1812. you some way to match the call-back to the original call (in case, for
  1813. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1814. want to get a call-back for each RecordID (for example, if you're looking up
  1815. attributes for only one RecordID), pass nil for eachRecordID.
  1816.  
  1817. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1818. attribute type (one from attrTypeList) that exists in the record specified
  1819. in the last eachRecordID call.  If you don't want to get a call-back for
  1820. each AttributeType (for example, if you're looking up only one attribute type,
  1821. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1822. call-back routine), pass nil for eachAttrType. However access controls may
  1823. prohibit you from reading some attribute types; in that case eachAttrValue
  1824. may not be called even though the value exists. Hence the client should
  1825. supply this call-back function to see the access controls for each attribute type.
  1826.  
  1827. This will be followed by one or more calls to eachAttrValue, to pass the
  1828. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1829. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1830. the value, and you can process it within the call-back routine.
  1831. After one or more values are returned, eachAttrType may be called again to pass
  1832. another attribute type that exists in the last-specified RecordID.
  1833.  
  1834. The client should return FALSE from eachRecordID, eachAttrType, and
  1835. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1836. from any call-back will terminate the LookupParse request.
  1837.  
  1838. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1839. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1840. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1841. However, if it was not even called once, then the attribute value may be too big to fit in the
  1842. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1843. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1844. ForEachAttributeValue was not called because the user does not have read access to some of
  1845. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1846. any of the attribute values.  A kOCEMoreData error is returned.
  1847.  
  1848. For synchronous calls, the call-back routine actually runs as part of the same thread
  1849. of execution as the thread that made the LookupParse call.  That means that the
  1850. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1851. that were in effect when the call was made.  Because of this, the call-back
  1852. routine has the same restrictions as the caller of LookupParse:
  1853. if LookupParse was not called from interrupt level, then the call-
  1854. back routine can allocate memory. For asynchronous calls, call-back routine is
  1855. like a ioCompletion except that A5 will be preserved for the application.
  1856. */
  1857. struct DirLookupParsePB {
  1858.     void *                            qLink;
  1859.     long                             reserved1;
  1860.     long                             reserved2;
  1861.     DirIOCompletionUPP                 ioCompletion;
  1862.     OSErr                             ioResult;
  1863.     unsigned long                     saveA5;
  1864.     short                             reqCode;
  1865.     long                             reserved[2];
  1866.     AddrBlock                         serverHint;
  1867.     short                             dsRefNum;
  1868.     unsigned long                     callID;
  1869.     AuthIdentity                     identity;
  1870.     long                             gReserved1;
  1871.     long                             gReserved2;
  1872.     long                             gReserved3;
  1873.     long                             clientData;
  1874.     RecordIDPtr *                    aRecordList;                /*  --> must be same from the corresponding Get call */
  1875.     AttributeTypePtr *                attrTypeList;                /*  --> must be same from the corresponding Get call */
  1876.     long                             cReserved;                    /*  --  */
  1877.     ForEachLookupRecordID             eachRecordID;                /*  --> */
  1878.     ForEachAttrTypeLookup             eachAttrType;                /*  --> */
  1879.     ForEachAttrValue                 eachAttrValue;                /*  --> */
  1880.     unsigned long                     recordIDCount;                /*  --> must be same from the corresponding Get call */
  1881.     unsigned long                     attrTypeCount;                /*  --> must be same from the corresponding Get call */
  1882.     long                             iReserved;                    /*  --  */
  1883.     void *                            getBuffer;                    /*  --> must be same from the corresponding Get call*/
  1884.     unsigned long                     getBufferSize;                /*  --> must be same from the corresponding Get call*/
  1885.     unsigned long                     lastRecordIndex;            /* <--  last RecordID processed when parse completed */
  1886.     unsigned long                     lastAttributeIndex;            /* <--  last Attribute Type processed when parse completed */
  1887.     Attribute                         lastAttribute;                /* <--  last attribute value (with this CreationID) processed when parse completed */
  1888.     unsigned long                     attrSize;                    /* <--  length of the attribute we did not return */
  1889. };
  1890. typedef struct DirLookupParsePB DirLookupParsePB;
  1891.  
  1892.  
  1893.  
  1894. /* AddAttributeValue */
  1895. struct DirAddAttributeValuePB {
  1896.     void *                            qLink;
  1897.     long                             reserved1;
  1898.     long                             reserved2;
  1899.     DirIOCompletionUPP                 ioCompletion;
  1900.     OSErr                             ioResult;
  1901.     unsigned long                     saveA5;
  1902.     short                             reqCode;
  1903.     long                             reserved[2];
  1904.     AddrBlock                         serverHint;
  1905.     short                             dsRefNum;
  1906.     unsigned long                     callID;
  1907.     AuthIdentity                     identity;
  1908.     long                             gReserved1;
  1909.     long                             gReserved2;
  1910.     long                             gReserved3;
  1911.     long                             clientData;
  1912.     RecordIDPtr                     aRecord;                    /*  --> */
  1913.     AttributePtr                     attr;                        /*  --> AttributeCreationID returned here */
  1914. };
  1915. typedef struct DirAddAttributeValuePB DirAddAttributeValuePB;
  1916.  
  1917. /*
  1918. aRecord must contain valid PackedRLI and a CreationID.
  1919.  
  1920. Instead of passing type, length, and value in three separate
  1921. fields, we take a pointer to an Attribute structure that contains
  1922. all three, and has room for the AttributeCreationNumber.
  1923. The AttributeCreationID will be returned in the attr itself.
  1924.  
  1925. The AttributeTag tells the catalog service that the attribute is an RString,
  1926. binary, or a RecordID.
  1927. */
  1928. /*
  1929. DeleteAttributeType:
  1930. This call is provided so that an existing AttributeType can be deleted.
  1931. If any attribute values exist for this type, they will all be deleted
  1932. (if the user has access rights to delete the values) and then the attribute type
  1933. will be deleted. Otherwise dsAccessDenied error will be returned.
  1934. */
  1935. struct DirDeleteAttributeTypePB {
  1936.     void *                            qLink;
  1937.     long                             reserved1;
  1938.     long                             reserved2;
  1939.     DirIOCompletionUPP                 ioCompletion;
  1940.     OSErr                             ioResult;
  1941.     unsigned long                     saveA5;
  1942.     short                             reqCode;
  1943.     long                             reserved[2];
  1944.     AddrBlock                         serverHint;
  1945.     short                             dsRefNum;
  1946.     unsigned long                     callID;
  1947.     AuthIdentity                     identity;
  1948.     long                             gReserved1;
  1949.     long                             gReserved2;
  1950.     long                             gReserved3;
  1951.     long                             clientData;
  1952.     RecordIDPtr                     aRecord;                    /*  --> */
  1953.     AttributeTypePtr                 attrType;                    /*  --> */
  1954. };
  1955. typedef struct DirDeleteAttributeTypePB DirDeleteAttributeTypePB;
  1956.  
  1957. /*
  1958.     DeleteAttributeValue
  1959. */
  1960. struct DirDeleteAttributeValuePB {
  1961.     void *                            qLink;
  1962.     long                             reserved1;
  1963.     long                             reserved2;
  1964.     DirIOCompletionUPP                 ioCompletion;
  1965.     OSErr                             ioResult;
  1966.     unsigned long                     saveA5;
  1967.     short                             reqCode;
  1968.     long                             reserved[2];
  1969.     AddrBlock                         serverHint;
  1970.     short                             dsRefNum;
  1971.     unsigned long                     callID;
  1972.     AuthIdentity                     identity;
  1973.     long                             gReserved1;
  1974.     long                             gReserved2;
  1975.     long                             gReserved3;
  1976.     long                             clientData;
  1977.     RecordIDPtr                     aRecord;                    /*  -> */
  1978.     AttributePtr                     attr;                        /*  -> */
  1979. };
  1980. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  1981.  
  1982.  
  1983.  
  1984. /*
  1985.     ChangeAttributeValue:
  1986.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  1987.                     sufficient
  1988.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  1989.                     CreationID field will be set when
  1990.                     the call succeesfully completes
  1991.     
  1992.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  1993.  
  1994.  
  1995.     
  1996. */
  1997. struct DirChangeAttributeValuePB {
  1998.     void *                            qLink;
  1999.     long                             reserved1;
  2000.     long                             reserved2;
  2001.     DirIOCompletionUPP                 ioCompletion;
  2002.     OSErr                             ioResult;
  2003.     unsigned long                     saveA5;
  2004.     short                             reqCode;
  2005.     long                             reserved[2];
  2006.     AddrBlock                         serverHint;
  2007.     short                             dsRefNum;
  2008.     unsigned long                     callID;
  2009.     AuthIdentity                     identity;
  2010.     long                             gReserved1;
  2011.     long                             gReserved2;
  2012.     long                             gReserved3;
  2013.     long                             clientData;
  2014.     RecordIDPtr                     aRecord;                    /*  -> */
  2015.     AttributePtr                     currentAttr;                /*  -> */
  2016.     AttributePtr                     newAttr;                    /*  -> */
  2017. };
  2018. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  2019.  
  2020.  
  2021. /* VerifyAttributeValue */
  2022. struct DirVerifyAttributeValuePB {
  2023.     void *                            qLink;
  2024.     long                             reserved1;
  2025.     long                             reserved2;
  2026.     DirIOCompletionUPP                 ioCompletion;
  2027.     OSErr                             ioResult;
  2028.     unsigned long                     saveA5;
  2029.     short                             reqCode;
  2030.     long                             reserved[2];
  2031.     AddrBlock                         serverHint;
  2032.     short                             dsRefNum;
  2033.     unsigned long                     callID;
  2034.     AuthIdentity                     identity;
  2035.     long                             gReserved1;
  2036.     long                             gReserved2;
  2037.     long                             gReserved3;
  2038.     long                             clientData;
  2039.     RecordIDPtr                     aRecord;                    /*  --> */
  2040.     AttributePtr                     attr;                        /*  --> */
  2041. };
  2042. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  2043.  
  2044. /*
  2045. aRecord must contain valid PackedRLI and a CreationID.
  2046.  
  2047. The attribute type and value are passed in the attribute structure.  If the
  2048. attribute CreationID is non-zero, the server will verify that an attribute with
  2049. the specified value and creation number exists in aRecord.  If the attribute
  2050. CreationID is zero, the server will verify the attribute by type and value
  2051. alone, and return the attribute CreationID in the Attribute struct if the
  2052. attribute exists.
  2053. */
  2054.  
  2055. /*
  2056. EnumerateAttributeTypesGet:
  2057. The following two calls can be used to enumerate the attribute types present in
  2058. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2059. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2060. be returned if the buffer was not large enough.  After this call completes, the
  2061. client can call EnumerateAttributeTypesParse (see below).
  2062.  
  2063. The user will able to continue from a startingPoint by setting a startingAttrType.
  2064. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2065. when 'kOCEMoreData' is returned.
  2066.  
  2067. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2068. will be included in the results, if it exists. If this is set to false, this value will not
  2069. be included. AttributeTypes following this type will be returned.
  2070. */
  2071. struct DirEnumerateAttributeTypesGetPB {
  2072.     void *                            qLink;
  2073.     long                             reserved1;
  2074.     long                             reserved2;
  2075.     DirIOCompletionUPP                 ioCompletion;
  2076.     OSErr                             ioResult;
  2077.     unsigned long                     saveA5;
  2078.     short                             reqCode;
  2079.     long                             reserved[2];
  2080.     AddrBlock                         serverHint;
  2081.     short                             dsRefNum;
  2082.     unsigned long                     callID;
  2083.     AuthIdentity                     identity;
  2084.     long                             gReserved1;
  2085.     long                             gReserved2;
  2086.     long                             gReserved3;
  2087.     long                             clientData;
  2088.     RecordIDPtr                     aRecord;                    /*  --> */
  2089.     AttributeTypePtr                 startingAttrType;            /*  --> starting point */
  2090.     long                             cReserved;                    /*  --  */
  2091.     long                             dReserved;                    /*  --  */
  2092.     long                             eReserved;                    /*  --  */
  2093.     long                             fReserved;                    /*  --  */
  2094.     long                             gReserved;                    /*  --  */
  2095.     long                             hReserved;                    /*  --  */
  2096.     Boolean                         includeStartingPoint;        /*  --> if true return the attrType specified by starting point */
  2097.     Byte                             padByte;
  2098.     short                             i1Reserved;                    /*  --  */
  2099.     void *                            getBuffer;                    /*  --> */
  2100.     unsigned long                     getBufferSize;                /*  --> */
  2101. };
  2102. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  2103.  
  2104. /* The call-back function is defined as follows: */
  2105. typedef CALLBACK_API( Boolean , ForEachAttrTypeProcPtr )(long clientData, const AttributeType *attrType);
  2106. typedef STACK_UPP_TYPE(ForEachAttrTypeProcPtr)                     ForEachAttrTypeUPP;
  2107. typedef ForEachAttrTypeUPP                 ForEachAttrType;
  2108. /*
  2109. EnumerateAttributeTypesParse:
  2110. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2111. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2112. toolbox will parse through the buffer and call the call-back routine for
  2113. each attribute type in the getBuffer.
  2114.  
  2115. The client should return false from eachAttrType to continue
  2116. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2117. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2118. you pass in the parameter block will be passed to eachAttrType.
  2119. You are free to put anything in clientData - it is intended to allow
  2120. you some way to match the call-back to the original call (in case, for
  2121. example, you make simultaneous asynchronous calls).
  2122.  
  2123. For synchronous calls, the call-back routine actually runs as part of the same thread
  2124. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2125. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2126. that were in effect when the call was made.  Because of this, the call-back
  2127. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2128. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2129. back routine can allocate memory. For asynchronous calls, call-back routine is
  2130. like a ioCompletion except that A5 will be preserved for the application.
  2131. */
  2132. struct DirEnumerateAttributeTypesParsePB {
  2133.     void *                            qLink;
  2134.     long                             reserved1;
  2135.     long                             reserved2;
  2136.     DirIOCompletionUPP                 ioCompletion;
  2137.     OSErr                             ioResult;
  2138.     unsigned long                     saveA5;
  2139.     short                             reqCode;
  2140.     long                             reserved[2];
  2141.     AddrBlock                         serverHint;
  2142.     short                             dsRefNum;
  2143.     unsigned long                     callID;
  2144.     AuthIdentity                     identity;
  2145.     long                             gReserved1;
  2146.     long                             gReserved2;
  2147.     long                             gReserved3;
  2148.     long                             clientData;
  2149.     RecordIDPtr                     aRecord;                    /*  --> Same as DirEnumerateAttributeTypesGetPB */
  2150.     long                             bReserved;                    /*  --  */
  2151.     long                             cReserved;                    /*  --  */
  2152.     long                             dReserved;                    /*  --  */
  2153.     ForEachAttrType                 eachAttrType;                /*  --> */
  2154.     long                             fReserved;                    /*  --  */
  2155.     long                             gReserved;                    /*  --  */
  2156.     long                             hReserved;                    /*  --  */
  2157.     long                             iReserved;                    /*  --  */
  2158.     void *                            getBuffer;                    /*  --> */
  2159.     unsigned long                     getBufferSize;                /*  --> */
  2160. };
  2161. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  2162.  
  2163. /*
  2164. DirAbort:
  2165. With this call a user will able to abort an outstanding catalog service call.
  2166. A user must pass a pointer to the parameter block for the outstanding call.
  2167. In the current version of the product, the toolbox will process this call
  2168. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2169. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2170. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2171. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2172. be called only in synchronous mode. Since the abort call makes references to fields in
  2173. the pb associated with the original call, this pb must not be disposed or or altered if
  2174. the original call completes before the abort call has completed.
  2175. */
  2176. struct DirAbortPB {
  2177.     void *                            qLink;
  2178.     long                             reserved1;
  2179.     long                             reserved2;
  2180.     DirIOCompletionUPP                 ioCompletion;
  2181.     OSErr                             ioResult;
  2182.     unsigned long                     saveA5;
  2183.     short                             reqCode;
  2184.     long                             reserved[2];
  2185.     AddrBlock                         serverHint;
  2186.     short                             dsRefNum;
  2187.     unsigned long                     callID;
  2188.     AuthIdentity                     identity;
  2189.     long                             gReserved1;
  2190.     long                             gReserved2;
  2191.     long                             gReserved3;
  2192.     long                             clientData;
  2193.     DirParamBlock *                    pb;                            /*  --> pb for the call which must be aborted */
  2194. };
  2195. typedef struct DirAbortPB DirAbortPB;
  2196.  
  2197.  
  2198. /*
  2199. AddPseudonym:
  2200. An alternate name and type can be added to a given record. If allowDuplicate
  2201. is set the name and type will be added even if the same name and type already
  2202. exists.
  2203. */
  2204. struct DirAddPseudonymPB {
  2205.     void *                            qLink;
  2206.     long                             reserved1;
  2207.     long                             reserved2;
  2208.     DirIOCompletionUPP                 ioCompletion;
  2209.     OSErr                             ioResult;
  2210.     unsigned long                     saveA5;
  2211.     short                             reqCode;
  2212.     long                             reserved[2];
  2213.     AddrBlock                         serverHint;
  2214.     short                             dsRefNum;
  2215.     unsigned long                     callID;
  2216.     AuthIdentity                     identity;
  2217.     long                             gReserved1;
  2218.     long                             gReserved2;
  2219.     long                             gReserved3;
  2220.     long                             clientData;
  2221.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym is to be added */
  2222.     RStringPtr                         pseudonymName;                /*  --> new name to be added as pseudonym */
  2223.     RStringPtr                         pseudonymType;                /*  --> new name to be added as pseudonym */
  2224.     Boolean                         allowDuplicate;                /*  --> */
  2225.     Boolean                         filler1;
  2226. };
  2227. typedef struct DirAddPseudonymPB DirAddPseudonymPB;
  2228.  
  2229. /*
  2230. DeletePseudonym:
  2231. An alternate name and type for a given record can be deleted.
  2232. */
  2233. struct DirDeletePseudonymPB {
  2234.     void *                            qLink;
  2235.     long                             reserved1;
  2236.     long                             reserved2;
  2237.     DirIOCompletionUPP                 ioCompletion;
  2238.     OSErr                             ioResult;
  2239.     unsigned long                     saveA5;
  2240.     short                             reqCode;
  2241.     long                             reserved[2];
  2242.     AddrBlock                         serverHint;
  2243.     short                             dsRefNum;
  2244.     unsigned long                     callID;
  2245.     AuthIdentity                     identity;
  2246.     long                             gReserved1;
  2247.     long                             gReserved2;
  2248.     long                             gReserved3;
  2249.     long                             clientData;
  2250.     RecordIDPtr                     aRecord;                    /*  --> RecordID to which pseudonym to be added */
  2251.     RStringPtr                         pseudonymName;                /*  --> pseudonymName to be deleted */
  2252.     RStringPtr                         pseudonymType;                /*  --> pseudonymType to be deleted */
  2253. };
  2254. typedef struct DirDeletePseudonymPB DirDeletePseudonymPB;
  2255.  
  2256.  
  2257. /*
  2258.     AddAlias:
  2259.     This call can be used to create an alias  record. The alias
  2260.     can be created either in the same or different cluster. ADAS will not support
  2261.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2262.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2263.     this call will create a record with the name and type specified an aRecord.
  2264.     This call works exactly like AddRecord.
  2265.     If 'allowDuplicate' is false and another record with same name and type already exists
  2266.     'daNoDupAllowed' error will be returned.
  2267. */
  2268. struct DirAddAliasPB {
  2269.     void *                            qLink;
  2270.     long                             reserved1;
  2271.     long                             reserved2;
  2272.     DirIOCompletionUPP                 ioCompletion;
  2273.     OSErr                             ioResult;
  2274.     unsigned long                     saveA5;
  2275.     short                             reqCode;
  2276.     long                             reserved[2];
  2277.     AddrBlock                         serverHint;
  2278.     short                             dsRefNum;
  2279.     unsigned long                     callID;
  2280.     AuthIdentity                     identity;
  2281.     long                             gReserved1;
  2282.     long                             gReserved2;
  2283.     long                             gReserved3;
  2284.     long                             clientData;
  2285.     RecordIDPtr                     aRecord;                    /*  -> */
  2286.     Boolean                         allowDuplicate;                /*  -> */
  2287.     Boolean                         filler1;
  2288. };
  2289. typedef struct DirAddAliasPB DirAddAliasPB;
  2290.  
  2291. /*
  2292. DirFindValue:
  2293. This call can be used to find the occurrence of a value. The value
  2294. to be matched is passed in the buffer 'matchingData' field. The current
  2295. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2296. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2297. be used for comparing the occurrence of data. Search can be restricted to
  2298. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2299. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2300. can be specified to find the next occurrence of the same value.
  2301. 'sortDirection' can be specified with starting values to search forward or backward.
  2302. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2303. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2304. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2305. attributes. Catalogs which don't support creationIDs may return the
  2306. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2307. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2308. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2309. find the next occurrence of the value.
  2310. */
  2311. struct DirFindValuePB {
  2312.     void *                            qLink;
  2313.     long                             reserved1;
  2314.     long                             reserved2;
  2315.     DirIOCompletionUPP                 ioCompletion;
  2316.     OSErr                             ioResult;
  2317.     unsigned long                     saveA5;
  2318.     short                             reqCode;
  2319.     long                             reserved[2];
  2320.     AddrBlock                         serverHint;
  2321.     short                             dsRefNum;
  2322.     unsigned long                     callID;
  2323.     AuthIdentity                     identity;
  2324.     long                             gReserved1;
  2325.     long                             gReserved2;
  2326.     long                             gReserved3;
  2327.     long                             clientData;
  2328.     PackedRLIPtr                     aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  2329.     LocalRecordIDPtr                 aRecord;                    /*  --> if not nil, look only in this record */
  2330.     AttributeTypePtr                 attrType;                    /*  --> if not nil, look only in this attribute type */
  2331.     LocalRecordIDPtr                 startingRecord;                /*  --> record in which to start searching */
  2332.     AttributePtr                     startingAttribute;            /*  --> attribute in which to start searching */
  2333.     LocalRecordIDPtr                 recordFound;                /* <--  record in which data was found */
  2334.     Attribute                         attributeFound;                /* <--  attribute in which data was found */
  2335.     unsigned long                     matchSize;                    /*  --> length of matching bytes */
  2336.     void *                            matchingData;                /*  --> data bytes to be matched in search */
  2337.     DirSortDirection                 sortDirection;                /*  --> sort direction (forwards or backwards) */
  2338. };
  2339. typedef struct DirFindValuePB DirFindValuePB;
  2340.  
  2341.  
  2342.  
  2343. /*
  2344. EnumeratePseudonymGet:
  2345. This call can be used to enumerate the existing pseudonyms for
  2346. a given record specified in 'aRecord'. A starting point can be specified
  2347. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2348. is true and a starting point is specified, the name specified by startingName
  2349. and startingType also is returned in the results, if it exists. If this is set to false,
  2350. the pseudonym in startingName and Type is not included.
  2351. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2352. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2353. name and type of the pseudonym. If the buffer could not hold all the results, then
  2354. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2355. using the last result returned as starting point for the next call.
  2356. */
  2357. struct DirEnumeratePseudonymGetPB {
  2358.     void *                            qLink;
  2359.     long                             reserved1;
  2360.     long                             reserved2;
  2361.     DirIOCompletionUPP                 ioCompletion;
  2362.     OSErr                             ioResult;
  2363.     unsigned long                     saveA5;
  2364.     short                             reqCode;
  2365.     long                             reserved[2];
  2366.     AddrBlock                         serverHint;
  2367.     short                             dsRefNum;
  2368.     unsigned long                     callID;
  2369.     AuthIdentity                     identity;
  2370.     long                             gReserved1;
  2371.     long                             gReserved2;
  2372.     long                             gReserved3;
  2373.     long                             clientData;
  2374.     RecordIDPtr                     aRecord;                    /*  --> */
  2375.     RStringPtr                         startingName;                /*  --> */
  2376.     RStringPtr                         startingType;                /*  --> */
  2377.     long                             dReserved;                    /*  --  */
  2378.     long                             eReserved;                    /*  --  */
  2379.     long                             fReserved;                    /*  --  */
  2380.     long                             gReserved;                    /*  --  */
  2381.     long                             hReserved;                    /*  --  */
  2382.     Boolean                         includeStartingPoint;        /*  --> if true return the Pseudonym specified by starting point will be included */
  2383.     Byte                             padByte;
  2384.     short                             i1Reserved;                    /*  --  */
  2385.     void *                            getBuffer;                    /*  --> */
  2386.     unsigned long                     getBufferSize;                /*  --> */
  2387. };
  2388. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  2389.  
  2390. /* The call-back function is defined as follows: */
  2391. typedef CALLBACK_API( Boolean , ForEachRecordIDProcPtr )(long clientData, const RecordID *recordID);
  2392. typedef STACK_UPP_TYPE(ForEachRecordIDProcPtr)                     ForEachRecordIDUPP;
  2393. typedef ForEachRecordIDUPP                 ForEachRecordID;
  2394. /*
  2395. EnumeratePseudonymParse:
  2396. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2397. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2398. will be called for each pseudonym.
  2399.  
  2400. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2401.  
  2402. For synchronous calls, the call-back routine actually runs as part of the same thread
  2403. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2404. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2405. that were in effect when the call was made.  Because of this, the call-back
  2406. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2407. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2408. back routine can allocate memory. For asynchronous calls, call-back routine is
  2409. like a ioCompletion except that A5 will be preserved for the application.
  2410. */
  2411. struct DirEnumeratePseudonymParsePB {
  2412.     void *                            qLink;
  2413.     long                             reserved1;
  2414.     long                             reserved2;
  2415.     DirIOCompletionUPP                 ioCompletion;
  2416.     OSErr                             ioResult;
  2417.     unsigned long                     saveA5;
  2418.     short                             reqCode;
  2419.     long                             reserved[2];
  2420.     AddrBlock                         serverHint;
  2421.     short                             dsRefNum;
  2422.     unsigned long                     callID;
  2423.     AuthIdentity                     identity;
  2424.     long                             gReserved1;
  2425.     long                             gReserved2;
  2426.     long                             gReserved3;
  2427.     long                             clientData;
  2428.     RecordIDPtr                     aRecord;                    /*  --> same as DirEnumerateAliasesGetPB */
  2429.     long                             bReserved;                    /*  --  */
  2430.     long                             cReserved;                    /*  --  */
  2431.     ForEachRecordID                 eachRecordID;                /*  --> */
  2432.     long                             eReserved;                    /*  --  */
  2433.     long                             fReserved;                    /*  --  */
  2434.     long                             gReserved;                    /*  --  */
  2435.     long                             hReserved;                    /*  --  */
  2436.     long                             iReserved;                    /*  --  */
  2437.     void *                            getBuffer;                    /*  --> */
  2438.     unsigned long                     getBufferSize;                /*  --> */
  2439. };
  2440. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  2441.  
  2442.  
  2443.  
  2444. /* GetNameAndType */
  2445. struct DirGetNameAndTypePB {
  2446.     void *                            qLink;
  2447.     long                             reserved1;
  2448.     long                             reserved2;
  2449.     DirIOCompletionUPP                 ioCompletion;
  2450.     OSErr                             ioResult;
  2451.     unsigned long                     saveA5;
  2452.     short                             reqCode;
  2453.     long                             reserved[2];
  2454.     AddrBlock                         serverHint;
  2455.     short                             dsRefNum;
  2456.     unsigned long                     callID;
  2457.     AuthIdentity                     identity;
  2458.     long                             gReserved1;
  2459.     long                             gReserved2;
  2460.     long                             gReserved3;
  2461.     long                             clientData;
  2462.     RecordIDPtr                     aRecord;                    /*  --> */
  2463. };
  2464. typedef struct DirGetNameAndTypePB DirGetNameAndTypePB;
  2465.  
  2466. /*
  2467. aRecord must contain valid RLI and a CreationID.  It
  2468. must also contain pointers to maximum-length RStrings (name and type fields)
  2469. in which will be returned the record's distinguished name and type.
  2470. */
  2471.  
  2472. /*
  2473. SetNameAndType:
  2474. This call can be used to change a name and type for a record. The record
  2475. to be renamed is specified using 'aRecord'.
  2476. 'newName' and 'newType' indicate the name and type to be set.
  2477. 'allowDuplicate' if true indicates that name is to be set even if another
  2478. name and type exactly matches the newName and newType specified.
  2479.  
  2480. 'newName' and 'newType' are required since the catalogs not supporting
  2481. CreationID require name and type fields in the recordID to identify a given
  2482. record.
  2483. */
  2484. struct DirSetNameAndTypePB {
  2485.     void *                            qLink;
  2486.     long                             reserved1;
  2487.     long                             reserved2;
  2488.     DirIOCompletionUPP                 ioCompletion;
  2489.     OSErr                             ioResult;
  2490.     unsigned long                     saveA5;
  2491.     short                             reqCode;
  2492.     long                             reserved[2];
  2493.     AddrBlock                         serverHint;
  2494.     short                             dsRefNum;
  2495.     unsigned long                     callID;
  2496.     AuthIdentity                     identity;
  2497.     long                             gReserved1;
  2498.     long                             gReserved2;
  2499.     long                             gReserved3;
  2500.     long                             clientData;
  2501.     RecordIDPtr                     aRecord;                    /*  --> */
  2502.     Boolean                         allowDuplicate;                /*  --> */
  2503.     Byte                             padByte;
  2504.     RStringPtr                         newName;                    /*  --> new name for the record */
  2505.     RStringPtr                         newType;                    /*  --> new type for the record */
  2506. };
  2507. typedef struct DirSetNameAndTypePB DirSetNameAndTypePB;
  2508.  
  2509.  
  2510.  
  2511.  
  2512. /*
  2513. DirGetMetaRecordInfo: This call can be made to obtain
  2514. the MetaRecordInfo for a given record. Information returned
  2515. is 16 bytes of OPAQUE information about the record.
  2516. */
  2517. struct DirGetRecordMetaInfoPB {
  2518.     void *                            qLink;
  2519.     long                             reserved1;
  2520.     long                             reserved2;
  2521.     DirIOCompletionUPP                 ioCompletion;
  2522.     OSErr                             ioResult;
  2523.     unsigned long                     saveA5;
  2524.     short                             reqCode;
  2525.     long                             reserved[2];
  2526.     AddrBlock                         serverHint;
  2527.     short                             dsRefNum;
  2528.     unsigned long                     callID;
  2529.     AuthIdentity                     identity;
  2530.     long                             gReserved1;
  2531.     long                             gReserved2;
  2532.     long                             gReserved3;
  2533.     long                             clientData;
  2534.     RecordIDPtr                     aRecord;                    /*  --> */
  2535.     DirMetaInfo                     metaInfo;                    /* <--  */
  2536. };
  2537. typedef struct DirGetRecordMetaInfoPB DirGetRecordMetaInfoPB;
  2538.  
  2539.  
  2540. /*
  2541. DirGetDNodeMetaInfo: This call can be made to obtain
  2542. the DNodeMetaInfo for a given Packed RLI. Information returned
  2543. is 16 bytes of OPAQUE information about the DNode.
  2544. */
  2545. struct DirGetDNodeMetaInfoPB {
  2546.     void *                            qLink;
  2547.     long                             reserved1;
  2548.     long                             reserved2;
  2549.     DirIOCompletionUPP                 ioCompletion;
  2550.     OSErr                             ioResult;
  2551.     unsigned long                     saveA5;
  2552.     short                             reqCode;
  2553.     long                             reserved[2];
  2554.     AddrBlock                         serverHint;
  2555.     short                             dsRefNum;
  2556.     unsigned long                     callID;
  2557.     AuthIdentity                     identity;
  2558.     long                             gReserved1;
  2559.     long                             gReserved2;
  2560.     long                             gReserved3;
  2561.     long                             clientData;
  2562.     PackedRLIPtr                     pRLI;                        /*  --> */
  2563.     DirMetaInfo                     metaInfo;                    /* <--  */
  2564. };
  2565. typedef struct DirGetDNodeMetaInfoPB DirGetDNodeMetaInfoPB;
  2566.  
  2567.  
  2568. /*
  2569. EnumerateDirectoriesGet:
  2570. A user can enumerate all the catalogs installed. This includes installed
  2571. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2572. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2573. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2574. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2575. The information for each catalog returned will have directoryName, discriminator and features.
  2576.  
  2577. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2578. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2579.  
  2580. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2581. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2582.  
  2583. If 'includeStartingPoint' is true and a starting point is specified,
  2584. the staring point will be returned in the result. If false, it is not included.
  2585. */
  2586. struct DirEnumerateDirectoriesGetPB {
  2587.     void *                            qLink;
  2588.     long                             reserved1;
  2589.     long                             reserved2;
  2590.     DirIOCompletionUPP                 ioCompletion;
  2591.     OSErr                             ioResult;
  2592.     unsigned long                     saveA5;
  2593.     short                             reqCode;
  2594.     long                             reserved[2];
  2595.     AddrBlock                         serverHint;
  2596.     short                             dsRefNum;
  2597.     unsigned long                     callID;
  2598.     AuthIdentity                     identity;
  2599.     long                             gReserved1;
  2600.     long                             gReserved2;
  2601.     long                             gReserved3;
  2602.     long                             clientData;
  2603.     OCEDirectoryKind                 directoryKind;                /*  --> enumerate catalogs bearing this signature */
  2604.     DirectoryNamePtr                 startingDirectoryName;        /*  --> staring catalog name */
  2605.     DirDiscriminator                 startingDirDiscriminator;    /*  --> staring catalog discriminator */
  2606.     long                             eReserved;                    /*  --  */
  2607.     long                             fReserved;                    /*  --  */
  2608.     long                             gReserved;                    /*  --  */
  2609.     long                             hReserved;                    /*  --  */
  2610.     Boolean                         includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  2611.     Byte                             padByte;
  2612.     short                             i1Reserved;                    /*  --  */
  2613.     void *                            getBuffer;                    /*  --> */
  2614.     unsigned long                     getBufferSize;                /*  --> */
  2615. };
  2616. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  2617.  
  2618.  
  2619.  
  2620. typedef CALLBACK_API( Boolean , ForEachDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
  2621. typedef STACK_UPP_TYPE(ForEachDirectoryProcPtr)                 ForEachDirectoryUPP;
  2622. typedef ForEachDirectoryUPP             ForEachDirectory;
  2623. /*
  2624. EnumerateDirectoriesParse:
  2625. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2626. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2627. be called for each catalog.
  2628.  
  2629. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2630.  
  2631. For synchronous calls, the call-back routine actually runs as part of the same thread
  2632. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2633. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2634. that were in effect when the call was made.  Because of this, the call-back
  2635. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2636. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2637. back routine can allocate memory. For asynchronous calls, call-back routine is
  2638. like a ioCompletion except that A5 will be preserved for the application.
  2639.  
  2640. eachDirectory will be called each time to return to the client a
  2641. DirectoryName, DirDiscriminator, and features for that catalog.
  2642. */
  2643. struct DirEnumerateDirectoriesParsePB {
  2644.     void *                            qLink;
  2645.     long                             reserved1;
  2646.     long                             reserved2;
  2647.     DirIOCompletionUPP                 ioCompletion;
  2648.     OSErr                             ioResult;
  2649.     unsigned long                     saveA5;
  2650.     short                             reqCode;
  2651.     long                             reserved[2];
  2652.     AddrBlock                         serverHint;
  2653.     short                             dsRefNum;
  2654.     unsigned long                     callID;
  2655.     AuthIdentity                     identity;
  2656.     long                             gReserved1;
  2657.     long                             gReserved2;
  2658.     long                             gReserved3;
  2659.     long                             clientData;
  2660.     long                             aReserved;                    /*  --  */
  2661.     long                             bReserved;                    /*  --  */
  2662.     long                             cReserved;                    /*  --  */
  2663.     long                             dReserved;                    /*  --  */
  2664.     ForEachDirectory                 eachDirectory;                /*  --> */
  2665.     long                             fReserved;                    /*  --  */
  2666.     long                             gReserved;                    /*  --  */
  2667.     long                             hReserved;                    /*  --  */
  2668.     long                             iReserved;                    /*  --  */
  2669.     void *                            getBuffer;                    /*  --> */
  2670.     unsigned long                     getBufferSize;                /*  --> */
  2671. };
  2672. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  2673.  
  2674.  
  2675. /*
  2676. The Following five call are specific to ADAP Catalogs. Toolbox
  2677. remembers a list of catalogs across boots. If any catalog service
  2678. call is intended for a ADAP catalog, then it must be in the list.
  2679. In order for managing this list, A client (Probably DE will use these
  2680. calls.
  2681. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2682. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2683. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2684. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2685. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2686. */
  2687. /*
  2688. NetSearchADAPDirectoriesGet:
  2689. This call can be used to make a network wide search for finding ADAP catalogs.
  2690. This call will be supported only by 'ADAP' and involve highly expensive
  2691. network operations, so the user is advised to use utmost discretion before
  2692. making this call. The results will be collected in the 'getbuffer' and can be
  2693. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2694. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2695. a PathFinder serving that catalog) are collected for each catalog found
  2696. on the network. If buffer is too small to hold all the catalogs found on
  2697. the network, a 'kOCEMoreData' error will be returned.
  2698. */
  2699. struct DirNetSearchADAPDirectoriesGetPB {
  2700.     void *                            qLink;
  2701.     long                             reserved1;
  2702.     long                             reserved2;
  2703.     DirIOCompletionUPP                 ioCompletion;
  2704.     OSErr                             ioResult;
  2705.     unsigned long                     saveA5;
  2706.     short                             reqCode;
  2707.     long                             reserved[2];
  2708.     AddrBlock                         serverHint;
  2709.     short                             dsRefNum;
  2710.     unsigned long                     callID;
  2711.     AuthIdentity                     identity;
  2712.     long                             gReserved1;
  2713.     long                             gReserved2;
  2714.     long                             gReserved3;
  2715.     long                             clientData;
  2716.     void *                            getBuffer;                    /*  --> */
  2717.     unsigned long                     getBufferSize;                /*  --> */
  2718.     long                             cReserved;                    /*  --  */
  2719. };
  2720. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  2721.  
  2722. typedef CALLBACK_API( Boolean , ForEachADAPDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
  2723. typedef STACK_UPP_TYPE(ForEachADAPDirectoryProcPtr)             ForEachADAPDirectoryUPP;
  2724. typedef ForEachADAPDirectoryUPP         ForEachADAPDirectory;
  2725. /*
  2726. DirNetSearchADAPDirectoriesParse:
  2727. This call can be used to extract the results obtained in the 'getBuffer'.
  2728. The directoryName, directoryDiscriminator, features and
  2729. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2730. returned in each call-back. These values may be used to make an
  2731. AddADAPDirectory call.
  2732.  
  2733. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2734.  
  2735. For synchronous calls, the call-back routine actually runs as part of the same thread
  2736. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2737. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2738. that were in effect when the call was made.  Because of this, the call-back
  2739. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2740. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2741. back routine can allocate memory. For asynchronous calls, call-back routine is
  2742. like a ioCompletion except that A5 will be preserved for the application.
  2743. */
  2744. struct DirNetSearchADAPDirectoriesParsePB {
  2745.     void *                            qLink;
  2746.     long                             reserved1;
  2747.     long                             reserved2;
  2748.     DirIOCompletionUPP                 ioCompletion;
  2749.     OSErr                             ioResult;
  2750.     unsigned long                     saveA5;
  2751.     short                             reqCode;
  2752.     long                             reserved[2];
  2753.     AddrBlock                         serverHint;
  2754.     short                             dsRefNum;
  2755.     unsigned long                     callID;
  2756.     AuthIdentity                     identity;
  2757.     long                             gReserved1;
  2758.     long                             gReserved2;
  2759.     long                             gReserved3;
  2760.     long                             clientData;
  2761.     void *                            getBuffer;                    /*  --> */
  2762.     unsigned long                     getBufferSize;                /*  --> */
  2763.     ForEachADAPDirectory             eachADAPDirectory;            /*  --> */
  2764. };
  2765. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2766.  
  2767. /*
  2768. DirFindADAPDirectoryByNetSearch:
  2769. This call can be used to make a network wide search to find an ADAP catalog.
  2770. This call will be supported only by 'ADAP' and involves highly expensive
  2771. network operations, so the user is advised to use utmost discretion before
  2772. making this call. The catalog is specified using directoryName and discriminator.
  2773. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2774. list and will be visible through the EnumerateDirectories call and also
  2775. also a creationID to the directoryRecord will be returned.
  2776. If this parameter is set to 'false', the catalog will be added to temporary list
  2777. and will be available for making other catalog service calls. The catalogs
  2778. which are not in the preference catalog list will not be visible through the
  2779. EnumerateDirectories call.
  2780. */
  2781. struct DirFindADAPDirectoryByNetSearchPB {
  2782.     void *                            qLink;
  2783.     long                             reserved1;
  2784.     long                             reserved2;
  2785.     DirIOCompletionUPP                 ioCompletion;
  2786.     OSErr                             ioResult;
  2787.     unsigned long                     saveA5;
  2788.     short                             reqCode;
  2789.     long                             reserved[2];
  2790.     AddrBlock                         serverHint;
  2791.     short                             dsRefNum;
  2792.     unsigned long                     callID;
  2793.     AuthIdentity                     identity;
  2794.     long                             gReserved1;
  2795.     long                             gReserved2;
  2796.     long                             gReserved3;
  2797.     long                             clientData;
  2798.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2799.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2800.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup List */
  2801.     Byte                             padByte;
  2802.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2803. };
  2804. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2805.  
  2806.  
  2807. /*
  2808. DirAddADAPDirectory:
  2809. The catalog specified by 'directoryName' and 'discriminator' will be
  2810. added to the list of catalogs maintained by the Toolbox. Once added,
  2811. the catalog is available across boots, until the catalog is removed
  2812. explicitly through a DirRemoveADAPDirectory call.
  2813. If 'serverHint' is not nil, the address provided will be used
  2814. to contact a PathFinder for the catalog specified.
  2815. If 'serverHint' is nil or does not point to a valid PathFinder server
  2816. for that catalog, this call will fail.
  2817. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2818. catalog list and will be visible through EnumerateDirectories calls and
  2819. also a creationID to the directoryRecord will be returned.
  2820. If this parameter is set to 'false', catalog will be added to temprary list
  2821. and will be available for making other catalog service calls. The catalogs
  2822. which are not in the setup  list will not be visible through
  2823. EnumerateDirectories call.
  2824. */
  2825. struct DirAddADAPDirectoryPB {
  2826.     void *                            qLink;
  2827.     long                             reserved1;
  2828.     long                             reserved2;
  2829.     DirIOCompletionUPP                 ioCompletion;
  2830.     OSErr                             ioResult;
  2831.     unsigned long                     saveA5;
  2832.     short                             reqCode;
  2833.     long                             reserved[2];
  2834.     AddrBlock                         serverHint;
  2835.     short                             dsRefNum;
  2836.     unsigned long                     callID;
  2837.     AuthIdentity                     identity;
  2838.     long                             gReserved1;
  2839.     long                             gReserved2;
  2840.     long                             gReserved3;
  2841.     long                             clientData;
  2842.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2843.     DirDiscriminator                 discriminator;                /*  --> discriminate between dup catalog names */
  2844.     Boolean                         addToOCESetup;                /*  --> add this catalog to OCE Setup */
  2845.     Byte                             padByte;
  2846.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  2847. };
  2848. typedef struct DirAddADAPDirectoryPB DirAddADAPDirectoryPB;
  2849.  
  2850.  
  2851.  
  2852. /*
  2853. GetDirectoryInfo:
  2854. DirGetDirectoryInfo will do:
  2855.  
  2856. If a 'dsRefNum' is non-Zero, the catalog information for
  2857.     the corresponding  PAB will be  returned.
  2858.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2859.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2860.  the catalog information (i.e. directoryName, discriminator, features)
  2861.  for that catalog will be returned.
  2862.     If a  valid catalog name and discriminator are provided
  2863.     features (Set of capability flags) for that catalog will be returned.
  2864. */
  2865. struct DirGetDirectoryInfoPB {
  2866.     void *                            qLink;
  2867.     long                             reserved1;
  2868.     long                             reserved2;
  2869.     DirIOCompletionUPP                 ioCompletion;
  2870.     OSErr                             ioResult;
  2871.     unsigned long                     saveA5;
  2872.     short                             reqCode;
  2873.     long                             reserved[2];
  2874.     AddrBlock                         serverHint;
  2875.     short                             dsRefNum;
  2876.     unsigned long                     callID;
  2877.     AuthIdentity                     identity;
  2878.     long                             gReserved1;
  2879.     long                             gReserved2;
  2880.     long                             gReserved3;
  2881.     long                             clientData;
  2882.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  2883.     DirDiscriminator                 discriminator;                /* <--> descriminate between dup catalog names */
  2884.     DirGestalt                         features;                    /* <--  capability bit flags */
  2885. };
  2886. typedef struct DirGetDirectoryInfoPB DirGetDirectoryInfoPB;
  2887.  
  2888.  
  2889. /*
  2890.  * Note on Access Controls:
  2891.  * Access control is based on a list model.
  2892.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2893.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2894.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2895.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2896.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2897.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2898.  *
  2899.  */
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905. /*
  2906.     GetDNodeAccessControlGet:
  2907.     This call can be done to get back access control list for a DNode.
  2908.     pRLI -> RLI of the DNode whose access control list is sought
  2909.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  2910.                       the identity parameter will be returned other wise entire list
  2911.                       will be returned.
  2912.     startingDsObj  -> If this is not nil, list should be started after this object.
  2913.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  2914.                               results.
  2915.                               
  2916.     The results will be collected in the 'getBuffer' supplied by the user.
  2917.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  2918.      
  2919.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  2920.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  2921.     
  2922.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  2923.  
  2924. */
  2925.  
  2926. struct DirGetDNodeAccessControlGetPB {
  2927.     void *                            qLink;
  2928.     long                             reserved1;
  2929.     long                             reserved2;
  2930.     DirIOCompletionUPP                 ioCompletion;
  2931.     OSErr                             ioResult;
  2932.     unsigned long                     saveA5;
  2933.     short                             reqCode;
  2934.     long                             reserved[2];
  2935.     AddrBlock                         serverHint;
  2936.     short                             dsRefNum;
  2937.     unsigned long                     callID;
  2938.     AuthIdentity                     identity;
  2939.     long                             gReserved1;
  2940.     long                             gReserved2;
  2941.     long                             gReserved3;
  2942.     long                             clientData;
  2943.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster whose access control list is sought  */
  2944.     long                             bReserved;                    /*  -- unused */
  2945.     long                             cReserved;                    /*  -- unused */
  2946.     long                             dReserved;                    /*  -- unused */
  2947.     long                             eResreved;                    /* --> */
  2948.     Boolean                         forCurrentUserOnly;            /* -->  */
  2949.     Boolean                         filler1;
  2950.     DSSpec *                        startingPoint;                /* --> starting Point */
  2951.     Boolean                         includeStartingPoint;        /* --> if true return the DsObject specified in starting point */
  2952.     Boolean                         filler2;
  2953.     void *                            getBuffer;                    /*    -> */
  2954.     unsigned long                     getBufferSize;                /*  -> */
  2955.  
  2956.  
  2957. };
  2958. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  2959.  
  2960. /* The Access Control call-back function is defined as follows: */
  2961. typedef CALLBACK_API( Boolean , ForEachDNodeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
  2962. typedef STACK_UPP_TYPE(ForEachDNodeAccessControlProcPtr)         ForEachDNodeAccessControlUPP;
  2963. typedef ForEachDNodeAccessControlUPP     ForEachDNodeAccessControl;
  2964. /*
  2965.     GetDNodeAccessControlParse:
  2966.     After an GetDNodeAccessControlGet call has completed, 
  2967.     call GetDNodeAccessControlParse to parse through the buffer that
  2968.     that was filled in GetDNodeAccessControlGet.
  2969.     
  2970.     'eachObject' will be called each time to return to the client a
  2971.     DsObject and a set of three accMasks (three long words) for that object.
  2972.     Acceesmasks returned apply to the dsObject in the callback :
  2973.     1. Currently Active Access mask for the specified DNode.
  2974.     2. Default Access mask for any Record in the DNode
  2975.     3. Default Access mask for any Attribute in the DNode
  2976.     The clientData parameter that you pass in the parameter block will be passed
  2977.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  2978.     to allow you some way to match the call-back to the original call (for
  2979.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  2980.     associate returned results in some way).
  2981.     
  2982.     The client should return FALSE from 'eachObject' to continue
  2983.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  2984.     terminate the GetDNodeAccessControlParse request.
  2985.  
  2986.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  2987.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  2988.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  2989.     that were in effect when the call was made.  Because of this, the call-back
  2990.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  2991.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  2992.     back routine can allocate memory. For asynchronous calls, call-back routine is
  2993.     like a ioCompletion except that A5 will be preserved for the application.
  2994.  
  2995.  
  2996. */
  2997.  
  2998. struct DirGetDNodeAccessControlParsePB {
  2999.     void *                            qLink;
  3000.     long                             reserved1;
  3001.     long                             reserved2;
  3002.     DirIOCompletionUPP                 ioCompletion;
  3003.     OSErr                             ioResult;
  3004.     unsigned long                     saveA5;
  3005.     short                             reqCode;
  3006.     long                             reserved[2];
  3007.     AddrBlock                         serverHint;
  3008.     short                             dsRefNum;
  3009.     unsigned long                     callID;
  3010.     AuthIdentity                     identity;
  3011.     long                             gReserved1;
  3012.     long                             gReserved2;
  3013.     long                             gReserved3;
  3014.     long                             clientData;
  3015.     PackedRLIPtr                     pRLI;                        /*  -> RLI of the cluster  */
  3016.     long                             bReserved;                    /*  -- unused */
  3017.     long                             cReserved;                    /*  -- unused */
  3018.     long                             dReserved;                    /*  -- unused */
  3019.     ForEachDNodeAccessControl         eachObject;                    /* --> */
  3020.     Boolean                         forCurrentUserOnly;            /* -->  */
  3021.     Boolean                         filler1;
  3022.     DSSpec *                        startingPoint;                /* --> starting Point */
  3023.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3024.     Boolean                         filler2;
  3025.     void *                            getBuffer;                    /*    -> */
  3026.     unsigned long                     getBufferSize;                /*  -> */
  3027.  
  3028.  
  3029. };
  3030. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  3031.  
  3032. /*
  3033.     GetRecordAccessControlGet:
  3034.     This call can be done to get back access control list for a RecordID.
  3035.     aRecord -> RecordID to which access control list is sought
  3036.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3037.                       the identity parameter will be returned other wise entire list
  3038.                       will be returned.
  3039.     startingDsObj  -> If this is not nil, list should be started after this object.
  3040.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3041.                               results.
  3042.                               
  3043.     The results will be collected in the 'getBuffer' supplied by the user.
  3044.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3045.      
  3046.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3047.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3048.     
  3049.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3050.  
  3051. */
  3052.  
  3053. struct DirGetRecordAccessControlGetPB {
  3054.     void *                            qLink;
  3055.     long                             reserved1;
  3056.     long                             reserved2;
  3057.     DirIOCompletionUPP                 ioCompletion;
  3058.     OSErr                             ioResult;
  3059.     unsigned long                     saveA5;
  3060.     short                             reqCode;
  3061.     long                             reserved[2];
  3062.     AddrBlock                         serverHint;
  3063.     short                             dsRefNum;
  3064.     unsigned long                     callID;
  3065.     AuthIdentity                     identity;
  3066.     long                             gReserved1;
  3067.     long                             gReserved2;
  3068.     long                             gReserved3;
  3069.     long                             clientData;
  3070.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3071.     long                             bReserved;                    /*  -- unused */
  3072.     long                             cReserved;                    /*  -- unused */
  3073.     long                             dReserved;                    /*  -- unused */
  3074.     long                             eResreved;                    /* --> */
  3075.     Boolean                         forCurrentUserOnly;            /* -->  */
  3076.     Boolean                         filler1;
  3077.     DSSpec *                        startingPoint;                /* --> starting Point */
  3078.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3079.     Boolean                         filler2;
  3080.     void *                            getBuffer;                    /*    -> */
  3081.     unsigned long                     getBufferSize;                /*  -> */
  3082.  
  3083.  
  3084. };
  3085. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  3086.  
  3087. /* The Access Control call-back function is defined as follows: */
  3088. typedef CALLBACK_API( Boolean , ForEachRecordAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
  3089. typedef STACK_UPP_TYPE(ForEachRecordAccessControlProcPtr)         ForEachRecordAccessControlUPP;
  3090. typedef ForEachRecordAccessControlUPP     ForEachRecordAccessControl;
  3091. /*
  3092.     GetRecordAccessControlParse:
  3093.     After an GetRecordAccessControlGet call has completed, 
  3094.     call GetRecordAccessControlParse to parse through the buffer that
  3095.     that was filled in GetRecordAccessControlGet.
  3096.     
  3097.     'eachObject' will be called each time to return to the client a
  3098.     DsObject and a set of three accMasks (three long words) for that object.
  3099.     Acceesmasks returned apply to the dsObject in the callback :
  3100.     1. Active Access mask for the DNode Containing the Record.
  3101.     2. Active Access mask for the Record specified.
  3102.     3. Defualt Access mask for Attributes in the record.
  3103.     The clientData parameter that you pass in the parameter block will be passed
  3104.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3105.     to allow you some way to match the call-back to the original call (for
  3106.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3107.     associate returned results in some way).
  3108.     
  3109.     The client should return FALSE from 'eachObject' to continue
  3110.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3111.     terminate the GetRecordAccessControlParse request.
  3112.  
  3113.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3114.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3115.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3116.     that were in effect when the call was made.  Because of this, the call-back
  3117.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3118.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3119.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3120.     like a ioCompletion except that A5 will be preserved for the application.
  3121.  
  3122.  
  3123. */
  3124.  
  3125. struct DirGetRecordAccessControlParsePB {
  3126.     void *                            qLink;
  3127.     long                             reserved1;
  3128.     long                             reserved2;
  3129.     DirIOCompletionUPP                 ioCompletion;
  3130.     OSErr                             ioResult;
  3131.     unsigned long                     saveA5;
  3132.     short                             reqCode;
  3133.     long                             reserved[2];
  3134.     AddrBlock                         serverHint;
  3135.     short                             dsRefNum;
  3136.     unsigned long                     callID;
  3137.     AuthIdentity                     identity;
  3138.     long                             gReserved1;
  3139.     long                             gReserved2;
  3140.     long                             gReserved3;
  3141.     long                             clientData;
  3142.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3143.     long                             bReserved;                    /*  -- unused */
  3144.     long                             cReserved;                    /*  -- unused */
  3145.     long                             dReserved;                    /*  -- unused */
  3146.     ForEachRecordAccessControl         eachObject;                    /* --> */
  3147.     Boolean                         forCurrentUserOnly;            /* -->  */
  3148.     Boolean                         filler1;
  3149.     DSSpec *                        startingPoint;                /* --> starting Point */
  3150.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3151.     Boolean                         filler2;
  3152.     void *                            getBuffer;                    /*    -> */
  3153.     unsigned long                     getBufferSize;                /*  -> */
  3154.  
  3155.  
  3156. };
  3157. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  3158.  
  3159. /*
  3160.     GetAttributeAccessControlGet:
  3161.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3162.     aRecord -> RecordID to which access control list is sought
  3163.     aType    -> Attribute Type to which access controls are sought
  3164.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3165.                       the identity parameter will be returned other wise entire list
  3166.                       will be returned.
  3167.     startingDsObj  -> If this is not nil, list should be started after this object.
  3168.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3169.                               results.
  3170.                               
  3171.     The results will be collected in the 'getBuffer' supplied by the user.
  3172.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3173.      
  3174.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3175.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3176.     
  3177.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3178.  
  3179. */
  3180.  
  3181. struct DirGetAttributeAccessControlGetPB {
  3182.     void *                            qLink;
  3183.     long                             reserved1;
  3184.     long                             reserved2;
  3185.     DirIOCompletionUPP                 ioCompletion;
  3186.     OSErr                             ioResult;
  3187.     unsigned long                     saveA5;
  3188.     short                             reqCode;
  3189.     long                             reserved[2];
  3190.     AddrBlock                         serverHint;
  3191.     short                             dsRefNum;
  3192.     unsigned long                     callID;
  3193.     AuthIdentity                     identity;
  3194.     long                             gReserved1;
  3195.     long                             gReserved2;
  3196.     long                             gReserved3;
  3197.     long                             clientData;
  3198.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3199.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3200.     long                             cReserved;                    /*  -- unused */
  3201.     long                             dReserved;                    /*  -- unused */
  3202.     long                             eResreved;                    /* --> */
  3203.     Boolean                         forCurrentUserOnly;            /* -->  */
  3204.     Boolean                         filler1;
  3205.     DSSpec *                        startingPoint;                /* --> starting Point */
  3206.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3207.     Boolean                         filler2;
  3208.     void *                            getBuffer;                    /*    -> */
  3209.     unsigned long                     getBufferSize;                /*  -> */
  3210.  
  3211.  
  3212. };
  3213. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  3214.  
  3215. /* The Access Control call-back function is defined as follows: */
  3216. typedef CALLBACK_API( Boolean , ForEachAttributeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
  3217. typedef STACK_UPP_TYPE(ForEachAttributeAccessControlProcPtr)     ForEachAttributeAccessControlUPP;
  3218. typedef ForEachAttributeAccessControlUPP  ForEachAttributeAccessControl;
  3219. /*
  3220.     GetAttributeAccessControlParse:
  3221.     After an GetAttributeAccessControlGet call has completed, 
  3222.     call GetAttributeAccessControlParse to parse through the buffer that
  3223.     that was filled in GetAttributeAccessControlGet.
  3224.     
  3225.     'eachObject' will be called each time to return to the client a
  3226.     DsObject and a set of three accMasks (three long words) for that object.
  3227.     Acceesmasks returned apply to the dsObject in the callback :
  3228.     1. Active Access mask for the DNode Containing the Attribute.
  3229.     2. Active Access mask for the Record in the Containing the Attribute.
  3230.     3. Active Access mask for the specified Attribute.
  3231.     The clientData parameter that you pass in the parameter block will be passed
  3232.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3233.     to allow you some way to match the call-back to the original call (for
  3234.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3235.     associate returned results in some way).
  3236.     
  3237.     The client should return FALSE from 'eachObject' to continue
  3238.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3239.     terminate the GetAttributeAccessControlParse request.
  3240.  
  3241.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3242.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3243.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3244.     that were in effect when the call was made.  Because of this, the call-back
  3245.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3246.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3247.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3248.     like a ioCompletion except that A5 will be preserved for the application.
  3249.  
  3250.  
  3251. */
  3252.  
  3253. struct DirGetAttributeAccessControlParsePB {
  3254.     void *                            qLink;
  3255.     long                             reserved1;
  3256.     long                             reserved2;
  3257.     DirIOCompletionUPP                 ioCompletion;
  3258.     OSErr                             ioResult;
  3259.     unsigned long                     saveA5;
  3260.     short                             reqCode;
  3261.     long                             reserved[2];
  3262.     AddrBlock                         serverHint;
  3263.     short                             dsRefNum;
  3264.     unsigned long                     callID;
  3265.     AuthIdentity                     identity;
  3266.     long                             gReserved1;
  3267.     long                             gReserved2;
  3268.     long                             gReserved3;
  3269.     long                             clientData;
  3270.     RecordIDPtr                     aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3271.     AttributeTypePtr                 aType;                        /*  -> Attribute Type to which access controls are sought          */
  3272.     long                             cReserved;                    /*  -- unused */
  3273.     long                             dReserved;                    /*  -- unused */
  3274.     ForEachAttributeAccessControl     eachObject;                    /* --> */
  3275.     Boolean                         forCurrentUserOnly;            /* -->  */
  3276.     Boolean                         filler1;
  3277.     DSSpec *                        startingPoint;                /* --> starting Point */
  3278.     Boolean                         includeStartingPoint;        /* --> if true return the record specified in starting point */
  3279.     Boolean                         filler2;
  3280.     void *                            getBuffer;                    /*    -> */
  3281.     unsigned long                     getBufferSize;                /*  -> */
  3282.  
  3283.  
  3284. };
  3285. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292. /*
  3293. MapPathNameToDNodeNumber:
  3294. This call maps a given PathName within a catalog to its DNodeNumber.
  3295. */
  3296. struct DirMapPathNameToDNodeNumberPB {
  3297.     void *                            qLink;
  3298.     long                             reserved1;
  3299.     long                             reserved2;
  3300.     DirIOCompletionUPP                 ioCompletion;
  3301.     OSErr                             ioResult;
  3302.     unsigned long                     saveA5;
  3303.     short                             reqCode;
  3304.     long                             reserved[2];
  3305.     AddrBlock                         serverHint;
  3306.     short                             dsRefNum;
  3307.     unsigned long                     callID;
  3308.     AuthIdentity                     identity;
  3309.     long                             gReserved1;
  3310.     long                             gReserved2;
  3311.     long                             gReserved3;
  3312.     long                             clientData;
  3313.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3314.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3315.     DNodeNum                         dNodeNumber;                /* <--  dNodenumber to the path */
  3316.     PackedPathNamePtr                 path;                        /*  --> Path Name to be mapped */
  3317. };
  3318. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  3319.  
  3320. /*
  3321. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3322. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3323. ignored. DSRefNum is used to identify the catalog.
  3324. */
  3325.  
  3326.  
  3327. /*
  3328. MapDNodeNumberToPathName:
  3329. This call will map a given DNodeNumber with in a catalog to the
  3330. corresponding PathName.
  3331. */
  3332. struct DirMapDNodeNumberToPathNamePB {
  3333.     void *                            qLink;
  3334.     long                             reserved1;
  3335.     long                             reserved2;
  3336.     DirIOCompletionUPP                 ioCompletion;
  3337.     OSErr                             ioResult;
  3338.     unsigned long                     saveA5;
  3339.     short                             reqCode;
  3340.     long                             reserved[2];
  3341.     AddrBlock                         serverHint;
  3342.     short                             dsRefNum;
  3343.     unsigned long                     callID;
  3344.     AuthIdentity                     identity;
  3345.     long                             gReserved1;
  3346.     long                             gReserved2;
  3347.     long                             gReserved3;
  3348.     long                             clientData;
  3349.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3350.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3351.     DNodeNum                         dNodeNumber;                /*  --> dNodenumber to be mapped */
  3352.     PackedPathNamePtr                 path;                        /* <--  Packed Path Name returned */
  3353.     unsigned short                     lengthOfPathName;            /*  --> length of packed pathName structure*/
  3354. };
  3355. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  3356.  
  3357. /*
  3358. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3359. pathName and returned in the PackedPathName field.
  3360. lengthOfPathName is to be set the length of pathName structure.
  3361. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3362. OSErr will be returned.
  3363. */
  3364. /*
  3365. GetLocalNetworkSpec:
  3366. This call will return the Local NetworkSpec. Client should supply
  3367. an RString big enough to hold the NetworkSpec.
  3368. */
  3369. struct DirGetLocalNetworkSpecPB {
  3370.     void *                            qLink;
  3371.     long                             reserved1;
  3372.     long                             reserved2;
  3373.     DirIOCompletionUPP                 ioCompletion;
  3374.     OSErr                             ioResult;
  3375.     unsigned long                     saveA5;
  3376.     short                             reqCode;
  3377.     long                             reserved[2];
  3378.     AddrBlock                         serverHint;
  3379.     short                             dsRefNum;
  3380.     unsigned long                     callID;
  3381.     AuthIdentity                     identity;
  3382.     long                             gReserved1;
  3383.     long                             gReserved2;
  3384.     long                             gReserved3;
  3385.     long                             clientData;
  3386.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3387.     DirDiscriminator                 discriminator;                /*  --> discriminator */
  3388.     NetworkSpecPtr                     networkSpec;                /* <--  NetworkSpec */
  3389. };
  3390. typedef struct DirGetLocalNetworkSpecPB DirGetLocalNetworkSpecPB;
  3391.  
  3392. /*
  3393. PathName in the path field must be set to nil. internetName should be large
  3394. enough to hold the internetName. InterNetname returned indicates path finder's
  3395. local internet (configured by administrator).
  3396. */
  3397. /*
  3398. GetDNodeInfo:
  3399. This call will return the information (internetName and descriptor)
  3400. for the given RLI of a DNode.
  3401. */
  3402. struct DirGetDNodeInfoPB {
  3403.     void *                            qLink;
  3404.     long                             reserved1;
  3405.     long                             reserved2;
  3406.     DirIOCompletionUPP                 ioCompletion;
  3407.     OSErr                             ioResult;
  3408.     unsigned long                     saveA5;
  3409.     short                             reqCode;
  3410.     long                             reserved[2];
  3411.     AddrBlock                         serverHint;
  3412.     short                             dsRefNum;
  3413.     unsigned long                     callID;
  3414.     AuthIdentity                     identity;
  3415.     long                             gReserved1;
  3416.     long                             gReserved2;
  3417.     long                             gReserved3;
  3418.     long                             clientData;
  3419.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI whose info is requested */
  3420.     DirNodeKind                     descriptor;                    /* <--  dNode descriptor */
  3421.     NetworkSpecPtr                     networkSpec;                /* <--  cluster's networkSpec if kIsCluster */
  3422. };
  3423. typedef struct DirGetDNodeInfoPB DirGetDNodeInfoPB;
  3424.  
  3425. /*
  3426. If DnodeNumber is set to a non zero value, path should be set to nil.
  3427. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3428. internetName should be large enough to hold
  3429. the internetName. (If the internetName is same as the one got by
  3430. GetLocalInternetName call, it indicates cluster is reachable  without
  3431. forwarders, --> Tell me if I am wrong)
  3432. */
  3433.  
  3434. /*
  3435. DirCreatePersonalDirectory:
  3436. A new  personal catalog can be created by specifying an FSSpec for
  3437. the file. If a file already exists dupFNErr will be returned. This call is
  3438. supported 'synchronous' mode only.
  3439. */
  3440. struct DirCreatePersonalDirectoryPB {
  3441.     void *                            qLink;
  3442.     long                             reserved1;
  3443.     long                             reserved2;
  3444.     DirIOCompletionUPP                 ioCompletion;
  3445.     OSErr                             ioResult;
  3446.     unsigned long                     saveA5;
  3447.     short                             reqCode;
  3448.     long                             reserved[2];
  3449.     AddrBlock                         serverHint;
  3450.     short                             dsRefNum;
  3451.     unsigned long                     callID;
  3452.     AuthIdentity                     identity;
  3453.     long                             gReserved1;
  3454.     long                             gReserved2;
  3455.     long                             gReserved3;
  3456.     long                             clientData;
  3457.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the Personal Catalog */
  3458.     OSType                             fdType;                        /*  --> file type for the Personal Catalog */
  3459.     OSType                             fdCreator;                    /*  --> file creator for the Personal Catalog */
  3460. };
  3461. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  3462.  
  3463. /*
  3464. DirOpenPersonalDirectory:
  3465. An existing personal catalog can be opened using this call.
  3466. User can specify the personal catalog by FSSpec for the AddressBook file.
  3467. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3468. are the only accepted open modes for the address book.
  3469. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3470. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3471. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3472. associated with the personal catalog.
  3473. This call is supported 'synchronous' mode only.
  3474. */
  3475.  
  3476. struct DirOpenPersonalDirectoryPB {
  3477.     void *                            qLink;
  3478.     long                             reserved1;
  3479.     long                             reserved2;
  3480.     DirIOCompletionUPP                 ioCompletion;
  3481.     OSErr                             ioResult;
  3482.     unsigned long                     saveA5;
  3483.     short                             reqCode;
  3484.     long                             reserved[2];
  3485.     AddrBlock                         serverHint;
  3486.     short                             dsRefNum;
  3487.     unsigned long                     callID;
  3488.     AuthIdentity                     identity;
  3489.     long                             gReserved1;
  3490.     long                             gReserved2;
  3491.     long                             gReserved3;
  3492.     long                             clientData;
  3493.     FSSpecPtr                         fsSpec;                        /*  --> Open an existing Personal Catalog */
  3494.     SInt8                             accessRequested;            /*  --> Open: permissions Requested(byte)*/
  3495.     SInt8                             accessGranted;                /*  <-- Open: permissions (byte) (Granted)*/
  3496.     DirGestalt                         features;                    /* <--  features for Personal Catalog */
  3497. };
  3498. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  3499.  
  3500. /*
  3501. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3502. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3503. This call is supported 'synchronous' mode only.
  3504. */
  3505. struct DirClosePersonalDirectoryPB {
  3506.     void *                            qLink;
  3507.     long                             reserved1;
  3508.     long                             reserved2;
  3509.     DirIOCompletionUPP                 ioCompletion;
  3510.     OSErr                             ioResult;
  3511.     unsigned long                     saveA5;
  3512.     short                             reqCode;
  3513.     long                             reserved[2];
  3514.     AddrBlock                         serverHint;
  3515.     short                             dsRefNum;
  3516.     unsigned long                     callID;
  3517.     AuthIdentity                     identity;
  3518.     long                             gReserved1;
  3519.     long                             gReserved2;
  3520.     long                             gReserved3;
  3521.     long                             clientData;
  3522. };
  3523. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  3524.  
  3525.  
  3526. /*
  3527. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3528. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3529. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3530. If a client has a need to make the AddressBook reference to persistent
  3531. acrross boots it should make use of this call. In the current implementaion
  3532. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3533. If client has a need to make reference to the AddressBook, it must use
  3534. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3535. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3536.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3537.                         absolute alias is created.
  3538.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3539.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3540.                         fails with 'kOCEMoreData' error a client can reissue
  3541.                     this call with a larger buffer of this length.
  3542.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3543.   returned.
  3544. This call is supported in 'synchronous' mode only.
  3545. */
  3546. struct DirMakePersonalDirectoryRLIPB {
  3547.     void *                            qLink;
  3548.     long                             reserved1;
  3549.     long                             reserved2;
  3550.     DirIOCompletionUPP                 ioCompletion;
  3551.     OSErr                             ioResult;
  3552.     unsigned long                     saveA5;
  3553.     short                             reqCode;
  3554.     long                             reserved[2];
  3555.     AddrBlock                         serverHint;
  3556.     short                             dsRefNum;
  3557.     unsigned long                     callID;
  3558.     AuthIdentity                     identity;
  3559.     long                             gReserved1;
  3560.     long                             gReserved2;
  3561.     long                             gReserved3;
  3562.     long                             clientData;
  3563.     FSSpecPtr                         fromFSSpec;                    /*  --> FSSpec for creating relative alia */
  3564.     unsigned short                     pRLIBufferSize;                /*  --> Length of 'pRLI' buffer */
  3565.     unsigned short                     pRLISize;                    /* <--  Length of actual 'pRLI' */
  3566.     PackedRLIPtr                     pRLI;                        /* <--  pRLI for the specified AddressBook */
  3567. };
  3568. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  3569.  
  3570.  
  3571. /*****************************************************************************
  3572. The calls described below apply only for CSAM Drivers:
  3573.  
  3574. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3575.     DirAddDSAM
  3576.     DirRemoveDSAM
  3577.     DirInstantiateDSAM
  3578.  
  3579. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3580.     DirAddDSAMDirectory
  3581.     DirRemoveDirectory
  3582.  
  3583. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3584. with a CSAM catalog.
  3585.  
  3586. *****************************************************************************/
  3587.  
  3588. /*
  3589. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3590. after discovering the CSAM file.
  3591.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3592.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3593.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3594. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3595. call returns 'daDSAMRecordCIDExists', record was already there and
  3596. 'dsamRecordCID' will be returned.
  3597. This call can be done only in synchronous mode.
  3598. */
  3599. struct DirAddDSAMPB {
  3600.     void *                            qLink;
  3601.     long                             reserved1;
  3602.     long                             reserved2;
  3603.     DirIOCompletionUPP                 ioCompletion;
  3604.     OSErr                             ioResult;
  3605.     unsigned long                     saveA5;
  3606.     short                             reqCode;
  3607.     long                             reserved[2];
  3608.     AddrBlock                         serverHint;
  3609.     short                             dsRefNum;
  3610.     unsigned long                     callID;
  3611.     AuthIdentity                     identity;
  3612.     long                             gReserved1;
  3613.     long                             gReserved2;
  3614.     long                             gReserved3;
  3615.     long                             clientData;
  3616.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3617.     RStringPtr                         dsamName;                    /*  --> CSAM name */
  3618.     OCEDirectoryKind                 dsamKind;                    /*  --> CSAM kind */
  3619.     FSSpecPtr                         fsSpec;                        /*  --> FSSpec for the file containing CSAM */
  3620. };
  3621. typedef struct DirAddDSAMPB DirAddDSAMPB;
  3622.  
  3623. /*
  3624. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3625. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3626.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3627.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3628.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3629.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3630.     CSAM should already be setup using DirAddDSAM call.
  3631.     DSAMDirProc -> This procedure will be called when  any catalog service
  3632.     call intended for the CSAM (other then parse calls)
  3633.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3634.     are called.
  3635.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3636.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3637. This call can be done only in synchronous mode.
  3638. */
  3639. typedef CALLBACK_API( OSErr , DSAMDirProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3640. typedef STACK_UPP_TYPE(DSAMDirProcPtr)                             DSAMDirUPP;
  3641. typedef DSAMDirUPP                         DSAMDirProc;
  3642. typedef CALLBACK_API( OSErr , DSAMDirParseProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3643. typedef STACK_UPP_TYPE(DSAMDirParseProcPtr)                     DSAMDirParseUPP;
  3644. typedef DSAMDirParseUPP                 DSAMDirParseProc;
  3645. typedef CALLBACK_API( OSErr , DSAMAuthProcPtr )(void *dsamData, AuthParamBlockPtr pb, Boolean async);
  3646. typedef STACK_UPP_TYPE(DSAMAuthProcPtr)                         DSAMAuthUPP;
  3647. typedef DSAMAuthUPP                     DSAMAuthProc;
  3648. struct DirInstantiateDSAMPB {
  3649.     void *                            qLink;
  3650.     long                             reserved1;
  3651.     long                             reserved2;
  3652.     DirIOCompletionUPP                 ioCompletion;
  3653.     OSErr                             ioResult;
  3654.     unsigned long                     saveA5;
  3655.     short                             reqCode;
  3656.     long                             reserved[2];
  3657.     AddrBlock                         serverHint;
  3658.     short                             dsRefNum;
  3659.     unsigned long                     callID;
  3660.     AuthIdentity                     identity;
  3661.     long                             gReserved1;
  3662.     long                             gReserved2;
  3663.     long                             gReserved3;
  3664.     long                             clientData;
  3665.     RStringPtr                         dsamName;                    /*  --> dsamName name */
  3666.     OCEDirectoryKind                 dsamKind;                    /*  --> DSAMKind */
  3667.     void *                            dsamData;                    /*  --> dsamData  */
  3668.     DSAMDirUPP                         dsamDirProc;                /*  --> of type DSAMDirProc: for catalog service calls */
  3669.     DSAMDirParseUPP                 dsamDirParseProc;            /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  3670.     DSAMAuthUPP                     dsamAuthProc;                /*  --> of type DSAMAuthProc: for authetication service calls */
  3671. };
  3672. typedef struct DirInstantiateDSAMPB DirInstantiateDSAMPB;
  3673.  
  3674.  
  3675. /*
  3676. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3677.     dsamRecordCID -> is the creationID of the CSAM record.
  3678. This call can be made only in synchronous mode.
  3679. */
  3680. struct DirRemoveDSAMPB {
  3681.     void *                            qLink;
  3682.     long                             reserved1;
  3683.     long                             reserved2;
  3684.     DirIOCompletionUPP                 ioCompletion;
  3685.     OSErr                             ioResult;
  3686.     unsigned long                     saveA5;
  3687.     short                             reqCode;
  3688.     long                             reserved[2];
  3689.     AddrBlock                         serverHint;
  3690.     short                             dsRefNum;
  3691.     unsigned long                     callID;
  3692.     AuthIdentity                     identity;
  3693.     long                             gReserved1;
  3694.     long                             gReserved2;
  3695.     long                             gReserved3;
  3696.     long                             clientData;
  3697.     CreationID                         dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3698. };
  3699. typedef struct DirRemoveDSAMPB DirRemoveDSAMPB;
  3700.  
  3701.  
  3702. /*
  3703. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3704.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3705.     directoryName ->  name of the catalog
  3706.     discriminator -> discriminator for the catalog
  3707.     directoryRecordCID -> If the call is successful, creationID for the record will
  3708.                             be returned.
  3709. */
  3710. struct DirAddDSAMDirectoryPB {
  3711.     void *                            qLink;
  3712.     long                             reserved1;
  3713.     long                             reserved2;
  3714.     DirIOCompletionUPP                 ioCompletion;
  3715.     OSErr                             ioResult;
  3716.     unsigned long                     saveA5;
  3717.     short                             reqCode;
  3718.     long                             reserved[2];
  3719.     AddrBlock                         serverHint;
  3720.     short                             dsRefNum;
  3721.     unsigned long                     callID;
  3722.     AuthIdentity                     identity;
  3723.     long                             gReserved1;
  3724.     long                             gReserved2;
  3725.     long                             gReserved3;
  3726.     long                             clientData;
  3727.     CreationID                         dsamRecordCID;                /*  --> CreationID for the CSAM record */
  3728.     DirectoryNamePtr                 directoryName;                /*  --> catalog name */
  3729.     DirDiscriminator                 discriminator;                /*  --> catalog discriminator */
  3730.     DirGestalt                         features;                    /*  --> capabilty flags for the catalog */
  3731.     CreationID                         directoryRecordCID;            /* <--  creationID for the catalog record */
  3732. };
  3733. typedef struct DirAddDSAMDirectoryPB DirAddDSAMDirectoryPB;
  3734.  
  3735. /*
  3736. DirRemoveDirectory: This call can be used to inform the toolbox that
  3737. catalog specified by 'directoryRecordCID'
  3738. */
  3739. struct DirRemoveDirectoryPB {
  3740.     void *                            qLink;
  3741.     long                             reserved1;
  3742.     long                             reserved2;
  3743.     DirIOCompletionUPP                 ioCompletion;
  3744.     OSErr                             ioResult;
  3745.     unsigned long                     saveA5;
  3746.     short                             reqCode;
  3747.     long                             reserved[2];
  3748.     AddrBlock                         serverHint;
  3749.     short                             dsRefNum;
  3750.     unsigned long                     callID;
  3751.     AuthIdentity                     identity;
  3752.     long                             gReserved1;
  3753.     long                             gReserved2;
  3754.     long                             gReserved3;
  3755.     long                             clientData;
  3756.     CreationID                         directoryRecordCID;            /*  --> creationID for the catalog record */
  3757. };
  3758. typedef struct DirRemoveDirectoryPB DirRemoveDirectoryPB;
  3759.  
  3760. /*
  3761.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3762.  * the information of various foreign catalogs supported.
  3763.  * Typically a DE Template  may make this call to create a
  3764.  * Address template or a Gateway may make this call to findout
  3765.  * catalog name space in which MSAM may would support. 
  3766.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3767.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3768.  * returned and reissue the call with increaing buffer.
  3769.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3770.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3771.  * for each catalog will be packed in the format: 
  3772.  * typedef struct EachDirectoryData {
  3773.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3774.  *  OSType                            entnType;        //  Entn Type
  3775.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3776.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3777.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3778.  *    long                            length;        //  data length
  3779.  *    char                            data[length];  //  data padded to even boundary
  3780.  * };
  3781.  *
  3782.  *
  3783.  *
  3784.  * typedef struct myData {
  3785.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3786.  *    };
  3787.  *
  3788.  */
  3789. struct DirGetExtendedDirectoriesInfoPB {
  3790.     void *                            qLink;
  3791.     long                             reserved1;
  3792.     long                             reserved2;
  3793.     DirIOCompletionUPP                 ioCompletion;
  3794.     OSErr                             ioResult;
  3795.     unsigned long                     saveA5;
  3796.     short                             reqCode;
  3797.     long                             reserved[2];
  3798.     AddrBlock                         serverHint;
  3799.     short                             dsRefNum;
  3800.     unsigned long                     callID;
  3801.     AuthIdentity                     identity;
  3802.     long                             gReserved1;
  3803.     long                             gReserved2;
  3804.     long                             gReserved3;
  3805.     long                             clientData;
  3806.     void *                            buffer;                        /*  --> Pointer to a buufer where data will be returned */
  3807.     unsigned long                     bufferSize;                    /*  --> Length of the buffer, Length of actual data will be returned here */
  3808.     unsigned long                     totalEntries;                /* <--  Total Number of Catalogs found */
  3809.     unsigned long                     actualEntries;                /* <--  Total Number of Catalogs entries returned */
  3810. };
  3811. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  3812.  
  3813. /*
  3814. DirGetDirectoryIconPB: With this call a client can find out about
  3815. the icons supported by the Catalog.
  3816. Both ADAP and Personal Catalog will not support this call for now.
  3817. A CSAM can support a call so that DE Extension can use this
  3818. call to find appropriate Icons.
  3819.  
  3820. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3821. */
  3822. struct DirGetDirectoryIconPB {
  3823.     void *                            qLink;
  3824.     long                             reserved1;
  3825.     long                             reserved2;
  3826.     DirIOCompletionUPP                 ioCompletion;
  3827.     OSErr                             ioResult;
  3828.     unsigned long                     saveA5;
  3829.     short                             reqCode;
  3830.     long                             reserved[2];
  3831.     AddrBlock                         serverHint;
  3832.     short                             dsRefNum;
  3833.     unsigned long                     callID;
  3834.     AuthIdentity                     identity;
  3835.     long                             gReserved1;
  3836.     long                             gReserved2;
  3837.     long                             gReserved3;
  3838.     long                             clientData;
  3839.     PackedRLIPtr                     pRLI;                        /*  --> packed RLI for the catalog */
  3840.     OSType                             iconType;                    /*  --> Type of Icon requested */
  3841.     void *                            iconBuffer;                    /*  --> Buffer to hold Icon Data */
  3842.     unsigned long                     bufferSize;                    /*  <-> size of buffer to hold icon data */
  3843. };
  3844. typedef struct DirGetDirectoryIconPB DirGetDirectoryIconPB;
  3845.  
  3846. /*
  3847. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3848. and oceSetupRecordCID for the oceSetup Record.
  3849. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3850. make this call to get 'dsRefNum'.
  3851. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3852. */
  3853. struct DirGetOCESetupRefNumPB {
  3854.     void *                            qLink;
  3855.     long                             reserved1;
  3856.     long                             reserved2;
  3857.     DirIOCompletionUPP                 ioCompletion;
  3858.     OSErr                             ioResult;
  3859.     unsigned long                     saveA5;
  3860.     short                             reqCode;
  3861.     long                             reserved[2];
  3862.     AddrBlock                         serverHint;
  3863.     short                             dsRefNum;
  3864.     unsigned long                     callID;
  3865.     AuthIdentity                     identity;
  3866.     long                             gReserved1;
  3867.     long                             gReserved2;
  3868.     long                             gReserved3;
  3869.     long                             clientData;
  3870.     CreationID                         oceSetupRecordCID;            /* --> creationID for the catalog record */
  3871. };
  3872. typedef struct DirGetOCESetupRefNumPB DirGetOCESetupRefNumPB;
  3873.  
  3874.  
  3875. /*****************************************************************************/
  3876. /* Catalog and Authentication control blocks and operation definitions */
  3877. union AuthParamBlock {
  3878.     struct {
  3879.         void *                            qLink;
  3880.         long                             reserved1;
  3881.         long                             reserved2;
  3882.         AuthIOCompletionUPP             ioCompletion;
  3883.         OSErr                             ioResult;
  3884.         unsigned long                     saveA5;
  3885.         short                             reqCode;
  3886.         long                             reserved[2];
  3887.         AddrBlock                         serverHint;
  3888.         short                             dsRefNum;
  3889.         unsigned long                     callID;
  3890.         AuthIdentity                     identity;
  3891.         long                             gReserved1;
  3892.         long                             gReserved2;
  3893.         long                             gReserved3;
  3894.         long                             clientData;
  3895.     }                                 header;
  3896.     AuthBindSpecificIdentityPB         bindIdentityPB;
  3897.     AuthUnbindSpecificIdentityPB     unbindIdentityPB;
  3898.     AuthResolveCreationIDPB         resolveCreationIDPB;
  3899.     AuthGetSpecificIdentityInfoPB     getIdentityInfoPB;
  3900.     AuthAddKeyPB                     addKeyPB;
  3901.     AuthChangeKeyPB                 changeKeyPB;
  3902.     AuthDeleteKeyPB                 deleteKeyPB;
  3903.     AuthPasswordToKeyPB             passwordToKeyPB;
  3904.     AuthGetCredentialsPB             getCredentialsPB;
  3905.     AuthDecryptCredentialsPB         decryptCredentialsPB;
  3906.     AuthMakeChallengePB             makeChallengePB;
  3907.     AuthMakeReplyPB                 makeReplyPB;
  3908.     AuthVerifyReplyPB                 verifyReplyPB;
  3909.     AuthGetUTCTimePB                 getUTCTimePB;
  3910.     AuthMakeProxyPB                 makeProxyPB;
  3911.     AuthTradeProxyForCredentialsPB     tradeProxyForCredentialsPB;
  3912.     AuthGetLocalIdentityPB             getLocalIdentityPB;
  3913.     AuthUnlockLocalIdentityPB         unLockLocalIdentityPB;
  3914.     AuthLockLocalIdentityPB         lockLocalIdentityPB;
  3915.     AuthAddToLocalIdentityQueuePB     localIdentityQInstallPB;
  3916.     AuthRemoveFromLocalIdentityQueuePB  localIdentityQRemovePB;
  3917.     AuthSetupLocalIdentityPB         setupLocalIdentityPB;
  3918.     AuthChangeLocalIdentityPB         changeLocalIdentityPB;
  3919.     AuthRemoveLocalIdentityPB         removeLocalIdentityPB;
  3920.     OCESetupAddDirectoryInfoPB         setupDirectoryIdentityPB;
  3921.     OCESetupChangeDirectoryInfoPB     changeDirectoryIdentityPB;
  3922.     OCESetupRemoveDirectoryInfoPB     removeDirectoryIdentityPB;
  3923.     OCESetupGetDirectoryInfoPB         getDirectoryIdentityInfoPB;
  3924. };
  3925.  
  3926. union DirParamBlock {
  3927.     struct {
  3928.         void *                            qLink;
  3929.         long                             reserved1;
  3930.         long                             reserved2;
  3931.         DirIOCompletionUPP                 ioCompletion;
  3932.         OSErr                             ioResult;
  3933.         unsigned long                     saveA5;
  3934.         short                             reqCode;
  3935.         long                             reserved[2];
  3936.         AddrBlock                         serverHint;
  3937.         short                             dsRefNum;
  3938.         unsigned long                     callID;
  3939.         AuthIdentity                     identity;
  3940.         long                             gReserved1;
  3941.         long                             gReserved2;
  3942.         long                             gReserved3;
  3943.         long                             clientData;
  3944.     }                                 header;
  3945.     DirAddRecordPB                     addRecordPB;
  3946.     DirDeleteRecordPB                 deleteRecordPB;
  3947.     DirEnumerateGetPB                 enumerateGetPB;
  3948.     DirEnumerateParsePB             enumerateParsePB;
  3949.     DirFindRecordGetPB                 findRecordGetPB;
  3950.     DirFindRecordParsePB             findRecordParsePB;
  3951.     DirLookupGetPB                     lookupGetPB;
  3952.     DirLookupParsePB                 lookupParsePB;
  3953.     DirAddAttributeValuePB             addAttributeValuePB;
  3954.     DirDeleteAttributeTypePB         deleteAttributeTypePB;
  3955.     DirDeleteAttributeValuePB         deleteAttributeValuePB;
  3956.     DirChangeAttributeValuePB         changeAttributeValuePB;
  3957.     DirVerifyAttributeValuePB         verifyAttributeValuePB;
  3958.     DirFindValuePB                     findValuePB;
  3959.     DirEnumeratePseudonymGetPB         enumeratePseudonymGetPB;
  3960.     DirEnumeratePseudonymParsePB     enumeratePseudonymParsePB;
  3961.     DirAddPseudonymPB                 addPseudonymPB;
  3962.     DirDeletePseudonymPB             deletePseudonymPB;
  3963.     DirAddAliasPB                     addAliasPB;
  3964.     DirEnumerateAttributeTypesGetPB  enumerateAttributeTypesGetPB;
  3965.     DirEnumerateAttributeTypesParsePB  enumerateAttributeTypesParsePB;
  3966.     DirGetNameAndTypePB             getNameAndTypePB;
  3967.     DirSetNameAndTypePB             setNameAndTypePB;
  3968.     DirGetRecordMetaInfoPB             getRecordMetaInfoPB;
  3969.     DirGetDNodeMetaInfoPB             getDNodeMetaInfoPB;
  3970.     DirGetDirectoryInfoPB             getDirectoryInfoPB;
  3971.  
  3972.     DirGetDNodeAccessControlGetPB     getDNodeAccessControlGetPB;
  3973.     DirGetDNodeAccessControlParsePB  getDNodeAccessControlParsePB;
  3974.  
  3975.     DirGetRecordAccessControlGetPB     getRecordAccessControlGetPB;
  3976.     DirGetRecordAccessControlParsePB  getRecordAccessControlParsePB;
  3977.  
  3978.     DirGetAttributeAccessControlGetPB  getAttributeAccessControlGetPB;
  3979.     DirGetAttributeAccessControlParsePB  getAttributeAccessControlParsePB;
  3980.  
  3981.  
  3982.     DirEnumerateDirectoriesGetPB     enumerateDirectoriesGetPB;
  3983.     DirEnumerateDirectoriesParsePB     enumerateDirectoriesParsePB;
  3984.  
  3985.     DirAddADAPDirectoryPB             addADAPDirectoryPB;
  3986.     DirRemoveDirectoryPB             removeDirectoryPB;
  3987.     DirNetSearchADAPDirectoriesGetPB  netSearchADAPDirectoriesGetPB;
  3988.     DirNetSearchADAPDirectoriesParsePB  netSearchADAPDirectoriesParsePB;
  3989.     DirFindADAPDirectoryByNetSearchPB  findADAPDirectoryByNetSearchPB;
  3990.  
  3991.  
  3992.     DirMapDNodeNumberToPathNamePB     mapDNodeNumberToPathNamePB;
  3993.     DirMapPathNameToDNodeNumberPB     mapPathNameToDNodeNumberPB;
  3994.     DirGetLocalNetworkSpecPB         getLocalNetworkSpecPB;
  3995.     DirGetDNodeInfoPB                 getDNodeInfoPB;
  3996.  
  3997.     DirCreatePersonalDirectoryPB     createPersonalDirectoryPB;
  3998.     DirOpenPersonalDirectoryPB         openPersonalDirectoryPB;
  3999.     DirClosePersonalDirectoryPB     closePersonalDirectoryPB;
  4000.     DirMakePersonalDirectoryRLIPB     makePersonalDirectoryRLIPB;
  4001.  
  4002.     DirAddDSAMPB                     addDSAMPB;
  4003.     DirInstantiateDSAMPB             instantiateDSAMPB;
  4004.     DirRemoveDSAMPB                 removeDSAMPB;
  4005.     DirAddDSAMDirectoryPB             addDSAMDirectoryPB;
  4006.     DirGetExtendedDirectoriesInfoPB  getExtendedDirectoriesInfoPB;
  4007.     DirGetDirectoryIconPB             getDirectoryIconPB;
  4008.  
  4009.     DirGetOCESetupRefNumPB             dirGetOCESetupRefNumPB;
  4010.  
  4011.     DirAbortPB                         abortPB;
  4012. };
  4013.  
  4014. enum { uppAuthIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4015. enum { uppNotificationProcInfo = 0x00003FD0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4016. enum { uppDirIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  4017. enum { uppForEachDirEnumSpecProcInfo = 0x000003D0 };             /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4018. enum { uppForEachRecordProcInfo = 0x00000FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4019. enum { uppForEachLookupRecordIDProcInfo = 0x000003D0 };         /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4020. enum { uppForEachAttrTypeLookupProcInfo = 0x00000FD0 };         /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
  4021. enum { uppForEachAttrValueProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4022. enum { uppForEachAttrTypeProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4023. enum { uppForEachRecordIDProcInfo = 0x000003D0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes) */
  4024. enum { uppForEachDirectoryProcInfo = 0x00003FD0 };                 /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4025. enum { uppForEachADAPDirectoryProcInfo = 0x0000FFD0 };             /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4026. enum { uppForEachDNodeAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4027. enum { uppForEachRecordAccessControlProcInfo = 0x0000FFD0 };     /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4028. enum { uppForEachAttributeAccessControlProcInfo = 0x0000FFD0 };  /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4029. enum { uppDSAMDirProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4030. enum { uppDSAMDirParseProcInfo = 0x000007E0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4031. enum { uppDSAMAuthProcInfo = 0x000007E0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
  4032. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4033.     #pragma parameter CallAuthIOCompletionProc(__A1, __A0)
  4034.     void CallAuthIOCompletionProc(AuthIOCompletionUPP routine, AuthParamBlockPtr paramBlock) = 0x4E91;
  4035. #else
  4036.     #define CallAuthIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppAuthIOCompletionProcInfo, (paramBlock))
  4037. #endif
  4038. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
  4039. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  4040.     #pragma parameter CallDirIOCompletionProc(__A1, __A0)
  4041.     void CallDirIOCompletionProc(DirIOCompletionUPP routine, DirParamBlockPtr paramBlock) = 0x4E91;
  4042. #else
  4043.     #define CallDirIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppDirIOCompletionProcInfo, (paramBlock))
  4044. #endif
  4045. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
  4046. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)  CALL_THREE_PARAMETER_UPP((userRoutine), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
  4047. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
  4048. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)  CALL_THREE_PARAMETER_UPP((userRoutine), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
  4049. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachAttrValueProcInfo, (clientData), (attribute))
  4050. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachAttrTypeProcInfo, (clientData), (attrType))
  4051. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)  CALL_TWO_PARAMETER_UPP((userRoutine), uppForEachRecordIDProcInfo, (clientData), (recordID))
  4052. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
  4053. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
  4054. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4055. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4056. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4057. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
  4058. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)  CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
  4059. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)         CALL_THREE_PARAMETER_UPP((userRoutine), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
  4060. #define NewAuthIOCompletionProc(userRoutine)                     (AuthIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
  4061. #define NewNotificationProc(userRoutine)                         (NotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
  4062. #define NewDirIOCompletionProc(userRoutine)                     (DirIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
  4063. #define NewForEachDirEnumSpecProc(userRoutine)                     (ForEachDirEnumSpecUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
  4064. #define NewForEachRecordProc(userRoutine)                         (ForEachRecordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
  4065. #define NewForEachLookupRecordIDProc(userRoutine)                 (ForEachLookupRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
  4066. #define NewForEachAttrTypeLookupProc(userRoutine)                 (ForEachAttrTypeLookupUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
  4067. #define NewForEachAttrValueProc(userRoutine)                     (ForEachAttrValueUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
  4068. #define NewForEachAttrTypeProc(userRoutine)                     (ForEachAttrTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
  4069. #define NewForEachRecordIDProc(userRoutine)                     (ForEachRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
  4070. #define NewForEachDirectoryProc(userRoutine)                     (ForEachDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
  4071. #define NewForEachADAPDirectoryProc(userRoutine)                 (ForEachADAPDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
  4072. #define NewForEachDNodeAccessControlProc(userRoutine)             (ForEachDNodeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
  4073. #define NewForEachRecordAccessControlProc(userRoutine)             (ForEachRecordAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
  4074. #define NewForEachAttributeAccessControlProc(userRoutine)         (ForEachAttributeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
  4075. #define NewDSAMDirProc(userRoutine)                             (DSAMDirUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
  4076. #define NewDSAMDirParseProc(userRoutine)                         (DSAMDirParseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
  4077. #define NewDSAMAuthProc(userRoutine)                             (DSAMAuthUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
  4078. EXTERN_API( OSErr )
  4079. AuthBindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4080.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0200, 0xAA5E);
  4081.  
  4082. EXTERN_API( OSErr )
  4083. AuthUnbindSpecificIdentity        (AuthParamBlockPtr         paramBlock,
  4084.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0201, 0xAA5E);
  4085.  
  4086. EXTERN_API( OSErr )
  4087. AuthResolveCreationID            (AuthParamBlockPtr         paramBlock,
  4088.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0202, 0xAA5E);
  4089.  
  4090. EXTERN_API( OSErr )
  4091. AuthGetSpecificIdentityInfo        (AuthParamBlockPtr         paramBlock,
  4092.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0203, 0xAA5E);
  4093.  
  4094. EXTERN_API( OSErr )
  4095. AuthAddKey                        (AuthParamBlockPtr         paramBlock,
  4096.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0207, 0xAA5E);
  4097.  
  4098. EXTERN_API( OSErr )
  4099. AuthChangeKey                    (AuthParamBlockPtr         paramBlock,
  4100.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0208, 0xAA5E);
  4101.  
  4102. EXTERN_API( OSErr )
  4103. AuthDeleteKey                    (AuthParamBlockPtr         paramBlock,
  4104.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0209, 0xAA5E);
  4105.  
  4106. EXTERN_API( OSErr )
  4107. AuthPasswordToKey                (AuthParamBlockPtr         paramBlock,
  4108.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020A, 0xAA5E);
  4109.  
  4110. EXTERN_API( OSErr )
  4111. AuthGetCredentials                (AuthParamBlockPtr         paramBlock,
  4112.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020B, 0xAA5E);
  4113.  
  4114. EXTERN_API( OSErr )
  4115. AuthDecryptCredentials            (AuthParamBlockPtr         paramBlock,
  4116.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020C, 0xAA5E);
  4117.  
  4118. EXTERN_API( OSErr )
  4119. AuthMakeChallenge                (AuthParamBlockPtr         paramBlock,
  4120.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020F, 0xAA5E);
  4121.  
  4122. EXTERN_API( OSErr )
  4123. AuthMakeReply                    (AuthParamBlockPtr         paramBlock,
  4124.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0210, 0xAA5E);
  4125.  
  4126. EXTERN_API( OSErr )
  4127. AuthVerifyReply                    (AuthParamBlockPtr         paramBlock,
  4128.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0211, 0xAA5E);
  4129.  
  4130. EXTERN_API( OSErr )
  4131. AuthGetUTCTime                    (AuthParamBlockPtr         paramBlock,
  4132.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021A, 0xAA5E);
  4133.  
  4134. EXTERN_API( OSErr )
  4135. AuthMakeProxy                    (AuthParamBlockPtr         paramBlock,
  4136.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0212, 0xAA5E);
  4137.  
  4138. EXTERN_API( OSErr )
  4139. AuthTradeProxyForCredentials    (AuthParamBlockPtr         paramBlock,
  4140.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0213, 0xAA5E);
  4141.  
  4142. /* Local Identity API */
  4143. EXTERN_API( OSErr )
  4144. AuthGetLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4145.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0204, 0xAA5E);
  4146.  
  4147. EXTERN_API( OSErr )
  4148. AuthUnlockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4149.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0214, 0xAA5E);
  4150.  
  4151. EXTERN_API( OSErr )
  4152. AuthLockLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4153.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0215, 0xAA5E);
  4154.  
  4155. EXTERN_API( OSErr )
  4156. AuthAddToLocalIdentityQueue        (AuthParamBlockPtr         paramBlock,
  4157.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0205, 0xAA5E);
  4158.  
  4159. EXTERN_API( OSErr )
  4160. AuthRemoveFromLocalIdentityQueue (AuthParamBlockPtr     paramBlock,
  4161.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0206, 0xAA5E);
  4162.  
  4163. EXTERN_API( OSErr )
  4164. AuthSetupLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4165.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0216, 0xAA5E);
  4166.  
  4167. EXTERN_API( OSErr )
  4168. AuthChangeLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4169.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0217, 0xAA5E);
  4170.  
  4171. EXTERN_API( OSErr )
  4172. AuthRemoveLocalIdentity            (AuthParamBlockPtr         paramBlock,
  4173.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0218, 0xAA5E);
  4174.  
  4175. EXTERN_API( OSErr )
  4176. DirAddRecord                    (DirParamBlockPtr         paramBlock,
  4177.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0109, 0xAA5E);
  4178.  
  4179. EXTERN_API( OSErr )
  4180. DirDeleteRecord                    (DirParamBlockPtr         paramBlock,
  4181.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010A, 0xAA5E);
  4182.  
  4183. EXTERN_API( OSErr )
  4184. DirEnumerateGet                    (DirParamBlockPtr         paramBlock,
  4185.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0111, 0xAA5E);
  4186.  
  4187. EXTERN_API( OSErr )
  4188. DirEnumerateParse                (DirParamBlockPtr         paramBlock,
  4189.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0101, 0xAA5E);
  4190.  
  4191. EXTERN_API( OSErr )
  4192. DirFindRecordGet                (DirParamBlockPtr         paramBlock,
  4193.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0140, 0xAA5E);
  4194.  
  4195. EXTERN_API( OSErr )
  4196. DirFindRecordParse                (DirParamBlockPtr         paramBlock,
  4197.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0141, 0xAA5E);
  4198.  
  4199. EXTERN_API( OSErr )
  4200. DirLookupGet                    (DirParamBlockPtr         paramBlock,
  4201.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0117, 0xAA5E);
  4202.  
  4203. EXTERN_API( OSErr )
  4204. DirLookupParse                    (DirParamBlockPtr         paramBlock,
  4205.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0102, 0xAA5E);
  4206.  
  4207. EXTERN_API( OSErr )
  4208. DirAddAttributeValue            (DirParamBlockPtr         paramBlock,
  4209.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010B, 0xAA5E);
  4210.  
  4211. EXTERN_API( OSErr )
  4212. DirDeleteAttributeValue            (DirParamBlockPtr         paramBlock,
  4213.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010C, 0xAA5E);
  4214.  
  4215. EXTERN_API( OSErr )
  4216. DirDeleteAttributeType            (DirParamBlockPtr         paramBlock,
  4217.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0130, 0xAA5E);
  4218.  
  4219. EXTERN_API( OSErr )
  4220. DirChangeAttributeValue            (DirParamBlockPtr         paramBlock,
  4221.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010D, 0xAA5E);
  4222.  
  4223. EXTERN_API( OSErr )
  4224. DirVerifyAttributeValue            (DirParamBlockPtr         paramBlock,
  4225.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010E, 0xAA5E);
  4226.  
  4227. EXTERN_API( OSErr )
  4228. DirFindValue                    (DirParamBlockPtr         paramBlock,
  4229.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0126, 0xAA5E);
  4230.  
  4231. EXTERN_API( OSErr )
  4232. DirEnumerateAttributeTypesGet    (DirParamBlockPtr         paramBlock,
  4233.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0112, 0xAA5E);
  4234.  
  4235. EXTERN_API( OSErr )
  4236. DirEnumerateAttributeTypesParse    (DirParamBlockPtr         paramBlock,
  4237.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0103, 0xAA5E);
  4238.  
  4239. EXTERN_API( OSErr )
  4240. DirAddPseudonym                    (DirParamBlockPtr         paramBlock,
  4241.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x010F, 0xAA5E);
  4242.  
  4243. EXTERN_API( OSErr )
  4244. DirDeletePseudonym                (DirParamBlockPtr         paramBlock,
  4245.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0110, 0xAA5E);
  4246.  
  4247. EXTERN_API( OSErr )
  4248. DirAddAlias                        (DirParamBlockPtr         paramBlock,
  4249.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011C, 0xAA5E);
  4250.  
  4251. EXTERN_API( OSErr )
  4252. DirEnumeratePseudonymGet        (DirParamBlockPtr         paramBlock,
  4253.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0113, 0xAA5E);
  4254.  
  4255. EXTERN_API( OSErr )
  4256. DirEnumeratePseudonymParse        (DirParamBlockPtr         paramBlock,
  4257.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0104, 0xAA5E);
  4258.  
  4259. EXTERN_API( OSErr )
  4260. DirGetNameAndType                (DirParamBlockPtr         paramBlock,
  4261.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0114, 0xAA5E);
  4262.  
  4263. EXTERN_API( OSErr )
  4264. DirSetNameAndType                (DirParamBlockPtr         paramBlock,
  4265.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0115, 0xAA5E);
  4266.  
  4267. EXTERN_API( OSErr )
  4268. DirGetRecordMetaInfo            (DirParamBlockPtr         paramBlock,
  4269.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0116, 0xAA5E);
  4270.  
  4271. EXTERN_API( OSErr )
  4272. DirGetDNodeMetaInfo                (DirParamBlockPtr         paramBlock,
  4273.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0118, 0xAA5E);
  4274.  
  4275. EXTERN_API( OSErr )
  4276. DirGetDirectoryInfo                (DirParamBlockPtr         paramBlock,
  4277.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0119, 0xAA5E);
  4278.  
  4279. EXTERN_API( OSErr )
  4280. DirGetDNodeAccessControlGet        (DirParamBlockPtr         paramBlock,
  4281.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012A, 0xAA5E);
  4282.  
  4283. EXTERN_API( OSErr )
  4284. DirGetDNodeAccessControlParse    (DirParamBlockPtr         paramBlock,
  4285.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012F, 0xAA5E);
  4286.  
  4287. EXTERN_API( OSErr )
  4288. DirGetRecordAccessControlGet    (DirParamBlockPtr         paramBlock,
  4289.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012C, 0xAA5E);
  4290.  
  4291. EXTERN_API( OSErr )
  4292. DirGetRecordAccessControlParse    (DirParamBlockPtr         paramBlock,
  4293.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0134, 0xAA5E);
  4294.  
  4295. EXTERN_API( OSErr )
  4296. DirGetAttributeAccessControlGet    (DirParamBlockPtr         paramBlock,
  4297.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x012E, 0xAA5E);
  4298.  
  4299. EXTERN_API( OSErr )
  4300. DirGetAttributeAccessControlParse (DirParamBlockPtr     paramBlock,
  4301.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0138, 0xAA5E);
  4302.  
  4303. EXTERN_API( OSErr )
  4304. DirEnumerateDirectoriesGet        (DirParamBlockPtr         paramBlock,
  4305.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x011A, 0xAA5E);
  4306.  
  4307. EXTERN_API( OSErr )
  4308. DirEnumerateDirectoriesParse    (DirParamBlockPtr         paramBlock,
  4309.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0106, 0xAA5E);
  4310.  
  4311. EXTERN_API( OSErr )
  4312. DirMapPathNameToDNodeNumber        (DirParamBlockPtr         paramBlock,
  4313.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0122, 0xAA5E);
  4314.  
  4315. EXTERN_API( OSErr )
  4316. DirMapDNodeNumberToPathName        (DirParamBlockPtr         paramBlock,
  4317.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0123, 0xAA5E);
  4318.  
  4319.  
  4320. EXTERN_API( OSErr )
  4321. DirGetLocalNetworkSpec            (DirParamBlockPtr         paramBlock,
  4322.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0124, 0xAA5E);
  4323.  
  4324. EXTERN_API( OSErr )
  4325. DirGetDNodeInfo                    (DirParamBlockPtr         paramBlock,
  4326.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0125, 0xAA5E);
  4327.  
  4328.  
  4329. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  4330. EXTERN_API( OSErr )
  4331. DirCreatePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011F, 0xAA5E);
  4332.  
  4333. EXTERN_API( OSErr )
  4334. DirOpenPersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011E, 0xAA5E);
  4335.  
  4336. EXTERN_API( OSErr )
  4337. DirClosePersonalDirectory        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0131, 0xAA5E);
  4338.  
  4339. EXTERN_API( OSErr )
  4340. DirMakePersonalDirectoryRLI        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0132, 0xAA5E);
  4341.  
  4342. EXTERN_API( OSErr )
  4343. DirAddDSAM                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011D, 0xAA5E);
  4344.  
  4345. EXTERN_API( OSErr )
  4346. DirInstantiateDSAM                (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0127, 0xAA5E);
  4347.  
  4348.  
  4349. EXTERN_API( OSErr )
  4350. DirRemoveDSAM                    (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0120, 0xAA5E);
  4351.  
  4352. EXTERN_API( OSErr )
  4353. DirAddDSAMDirectory                (DirParamBlockPtr         paramBlock,
  4354.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0133, 0xAA5E);
  4355.  
  4356. EXTERN_API( OSErr )
  4357. DirGetExtendedDirectoriesInfo    (DirParamBlockPtr         paramBlock,
  4358.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0136, 0xAA5E);
  4359.  
  4360. EXTERN_API( OSErr )
  4361. DirGetDirectoryIcon                (DirParamBlockPtr         paramBlock,
  4362.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0121, 0xAA5E);
  4363.  
  4364.  
  4365. EXTERN_API( OSErr )
  4366. DirAddADAPDirectory                (DirParamBlockPtr         paramBlock,
  4367.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0137, 0xAA5E);
  4368.  
  4369. EXTERN_API( OSErr )
  4370. DirRemoveDirectory                (DirParamBlockPtr         paramBlock,
  4371.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0135, 0xAA5E);
  4372.  
  4373. EXTERN_API( OSErr )
  4374. DirNetSearchADAPDirectoriesGet    (DirParamBlockPtr         paramBlock,
  4375.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0108, 0xAA5E);
  4376.  
  4377. EXTERN_API( OSErr )
  4378. DirNetSearchADAPDirectoriesParse (DirParamBlockPtr         paramBlock,
  4379.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0105, 0xAA5E);
  4380.  
  4381. EXTERN_API( OSErr )
  4382. DirFindADAPDirectoryByNetSearch    (DirParamBlockPtr         paramBlock,
  4383.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0107, 0xAA5E);
  4384.  
  4385. EXTERN_API( OSErr )
  4386. DirGetOCESetupRefNum            (DirParamBlockPtr         paramBlock,
  4387.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0128, 0xAA5E);
  4388.  
  4389. EXTERN_API( OSErr )
  4390. DirAbort                        (DirParamBlockPtr         paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011B, 0xAA5E);
  4391.  
  4392. EXTERN_API( OSErr )
  4393. OCESetupAddDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4394.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x0219, 0xAA5E);
  4395.  
  4396. EXTERN_API( OSErr )
  4397. OCESetupChangeDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4398.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x021B, 0xAA5E);
  4399.  
  4400. EXTERN_API( OSErr )
  4401. OCESetupRemoveDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4402.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020D, 0xAA5E);
  4403.  
  4404. EXTERN_API( OSErr )
  4405. OCESetupGetDirectoryInfo        (AuthParamBlockPtr         paramBlock,
  4406.                                  Boolean                 async)                                THREEWORDINLINE(0x3F3C, 0x020E, 0xAA5E);
  4407.  
  4408.  
  4409. #if PRAGMA_STRUCT_ALIGN
  4410.     #pragma options align=reset
  4411. #elif PRAGMA_STRUCT_PACKPUSH
  4412.     #pragma pack(pop)
  4413. #elif PRAGMA_STRUCT_PACK
  4414.     #pragma pack()
  4415. #endif
  4416.  
  4417. #ifdef PRAGMA_IMPORT_OFF
  4418. #pragma import off
  4419. #elif PRAGMA_IMPORT
  4420. #pragma import reset
  4421. #endif
  4422.  
  4423. #ifdef __cplusplus
  4424. }
  4425. #endif
  4426.  
  4427. #endif /* __OCEAUTHDIR__ */
  4428.  
  4429.